Page 1 of 1

last weird question from lizard

Posted: Wed May 18, 2005 2:08 am
by lizardkid
yes this is my FINAL QUESTION, might as well have made this script a community project lol.

ok the idea is to have the guy who is threaded aim at the location given o the thread and shoot until kingdom comes. so far any guy i tell to do this does exactly this:

Turns and tenses, aiming.
Waits until i give the order to HOLD or REGROUP, then fires off one barrage (1 shot for sniper/garand, about 10 for anything else)
then follows the HOLD or REGROUP order.

which makes NO SENSE to me how it happens. i've tried throwing thread calls to HOLD and REGROUP at every imaginable point in this thread, and it wont work.

Code: Select all

shooter local.target:

while(level.squadIsCommandable == TRUE)
{
self turnto local.target
self exec global/aimat.scr local.target
iprintln "AIMING"
self waittill animdone
self exec global/shoot.scr
iprintln "FIRING!"
}
end
none of the iprintln's fire... but they shoot and aim ?????????
HELP! this is a nightmare!

Re: last weird question from lizard

Posted: Wed May 18, 2005 10:31 am
by Rookie One.pl

Code: Select all

while(level.squadIsCommandable == TRUE)
There's no such thing as TRUE in MoHAA scripting. Everything != 0 is considered true.

Posted: Wed May 18, 2005 2:06 pm
by lizardkid
no no, i set it that way purposely, that part works in other threads. but i'll try replacing it. might as well for convention anyway.

Posted: Wed May 18, 2005 6:11 pm
by jv_map
Presumably the error is somewhere else, not in those few lines you posted :?

Posted: Wed May 18, 2005 6:28 pm
by lizardkid
found it, timing error :oops: