help with the compass in aum 45

Posted By: Shelley

help with the compass in aum 45 - 03/18/09 09:51

Maybe some one could help with this
the compass in aum 45 I put the wdl in my program and it show up ok on the screen
but the needle does not move. Was I to add something else to my program as it did not say to?
thanks
Posted By: George

Re: help with the compass in aum 45 - 03/18/09 19:24

Put this line at the beginning of your player action:

player = my;
Posted By: Shelley

Re: help with the compass in aum 45 - 03/19/09 02:58

It did not work
I put in a watch for needle roll it said 0.00
one for my.pan and one for my and player it said not avalable
for the three I put the player=my in the main while loop
also I am useing a6 plus I made the test level useing the
shooter then add it after. When I press the f11
key I do see the pan working from 0 to 360
I also did a step trace it does not seem to go past the
while(!) player==null and if I rem it out it says its an empty pointerin set compass needle.roll = -player.pan;
if this helps
Posted By: George

Re: help with the compass in aum 45 - 03/19/09 07:25

First of all, your line should be while (!player) {wait (1);} or while(player == null) {wait (1);}
Then, you should put the line I've told you about inside your player action.
Posted By: Shelley

Re: help with the compass in aum 45 - 03/19/09 13:41

here is where it is at i tryed it there and even tried it below in the while loop below the while player==


starter set_compass()
{

while (player == null) {wait (1);}
player=my;

while (1)
{needle.roll = -player.pan;
wait (1);
}
}
Posted By: George

Re: help with the compass in aum 45 - 03/20/09 07:15

You should put the "player = my;" line of code inside your player action, not inside "starter set_compass()".
Posted By: Shelley

Re: help with the compass in aum 45 - 03/20/09 18:05

I am Sorry but I am not understand you on this.
If I don't get it this time I won't bother you again with it
is this what you you are saying

action player_comp()
{
player = my;
}

I put the action player_Comp in the test level before the main

I put the player_comp() in several different place not
all at once from the one post you said it should go below the
while (player == null) {wait (1);}
the only place that it is the starter set_compass so
I put player_comp(); there nothing happened then
I put it in the test level main while loop again nothing
and the watch still says its not avilable and the step trace
if i place it on the while(1) or needle.roll when it hits
that while (player line it just stays there as it still is
null I know it is something stupid I am doing wrong but I can't
figure what
Thanks for you time and I am sorry to be a pain
Posted By: Shelley

Re: help with the compass in aum 45 - 03/20/09 18:08

I am Sorry but I am not understand you on this.
If I don't get it this time I won't bother you again with it
is this what you you are saying

action player_comp()
{
player = my;
}

I put the action player_Comp in the test level before the main

I put the player_comp() in several different place not
all at once from the one post you said it should go below the
while (player == null) {wait (1);}
the only place that it is the starter set_compass so
I put player_comp(); there nothing happened then
I put it in the test level main while loop again nothing
I know it is something stupid I am doing wrong but I can't
figure what
Thanks for you time and I am sorry to be a pain
Posted By: George

Re: help with the compass in aum 45 - 03/21/09 03:37

Hello Shelley,

Don't worry, you aren't bothering me at all. Your project should contain a player action - it's the action attached to your player model in Wed. Go to that model and get the name attached to it - let's say it's "my_player". Now search the script(s) until you find this action; let's say that it looks like this:

action my_player()
{
....
}

now put the line of code I've told you about inside the action:

action my_player()
{
player = my;
....
}

That's all.
Posted By: Shelley

Re: help with the compass in aum 45 - 03/22/09 04:16

That was it smile it was in the PlBiped01.wdl
action PlBiped01()
I knew it was something stupid I was doing
Thank you so much for yuor help
Posted By: George

Re: help with the compass in aum 45 - 03/23/09 06:44

You are welcome. Let me know if you need more help.
© 2024 lite-C Forums