i noticed that command 'wait xx' necessary
it is similar 'move' and 'wait'
....
i need same command as 'waitmove'
(wait until command end)
this is a part of my scr:
//-----
// testway
//----
testway:
$badguy runto $test1
iprintln "1"
wait 10
$badguy runto $test2
iprintln "2"
wait 10
goto testway
end
example, if suppose badguy consume 4second when move from $test1(info_pathnode's targetname) to $test2, and i type 'wait 2' in my scr,
then badguy return when he moved half distance of path.
sorry that my strange english
thanks
ai:patrol problem
Moderator: Moderators
- williewisp
- First Lieutenant
- Posts: 208
- Joined: Fri May 16, 2003 1:10 pm
- Location: ireland
testway:
$badguy runto $test1
iprintln "1"
wait 10
$badguy runto $test2
iprintln "2"
wait 10
goto testway
there is another prob wit this code if the badguy is dead the code will still loop.
do a search
i posted a script of a level it shud have wat you looking for i think the post was called "tidy up" jv
had a gud reply to that part of the script.

$badguy runto $test1
iprintln "1"
wait 10
$badguy runto $test2
iprintln "2"
wait 10
goto testway
there is another prob wit this code if the badguy is dead the code will still loop.
do a search
i posted a script of a level it shud have wat you looking for i think the post was called "tidy up" jv
it's not a time for thinking its a time for drinking!
- williewisp
- First Lieutenant
- Posts: 208
- Joined: Fri May 16, 2003 1:10 pm
- Location: ireland
bdbodger please look this
//----
// badguy2move
//----
badguy2move:
$badguy2 runto $ppath1
$badguy2 waitmove
$badguy2 runto $ppath2
$badguy2 waitmove
end
above scr successful
thankyou for teaching me
but i want infinitely move
so i added follow line:
goto badguy2move
when i make server my map,game freeze while loading
i want recycle
// badguy2move
//----
badguy2move:
$badguy2 runto $ppath1
$badguy2 waitmove
$badguy2 runto $ppath2
$badguy2 waitmove
end
above scr successful
thankyou for teaching me
but i want infinitely move
so i added follow line:
goto badguy2move
when i make server my map,game freeze while loading
i want recycle
goto badguy2move creates an infinite loop in your script, and that is why the server crashed.
I don't know for sure the correct way to do it, but I think it's:
badguy2move:
while (isAlive $badguy2)
{
$badguy2 runto $ppath1
$badguy2 waitmove
$badguy2 runto $ppath2
$badguy2 waitmove
}
end
That should keep him patrolling as long as he is not dead.
I don't know for sure the correct way to do it, but I think it's:
badguy2move:
while (isAlive $badguy2)
{
$badguy2 runto $ppath1
$badguy2 waitmove
$badguy2 runto $ppath2
$badguy2 waitmove
}
end
That should keep him patrolling as long as he is not dead.
