Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Does WaitForStop() not work with AI?
Does WaitForStop() not work with AI?
2003-06-18, 1:42 PM #1
I've got a cutscene cog but it doesn't move the actors to their frames, the only thing I can figure is that WaitForStop() doesn't work with AI.

So my question, does WaitForStop() work only with non-AI things (e.g. elevators, doors, and so on)?

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"
2003-06-18, 2:27 PM #2
I thought so.

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-06-18, 2:37 PM #3
I don't think so. If I remember, I started using the "arrived" message because WaitForStop() wouldn't work for ai. It could depend on certain things in the ai, I suppose, or perhaps the current AIMode.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
Catloaf, meet mouseloaf.
My music
2003-06-18, 2:41 PM #4
hmmm... Well here's the cog that's giving me problems...
Code:
symbols

thing        camera
thing        camera2
thing        camera3
thing        otona
thing        player                         local
thing        fakeplayer
thing        narpolice
thing        inspector
thing        door

sound        otonasound

message      startup

end                                                                           

# ========================================================================================

code

startup:
  
                Player = GetLocalPlayerThing();

                // freeze player
                SetActorFlags(Player, 0xa00000);
                StopThing(Player);
                SetThingCurGeoMode(player, 0);
                SetThingCurGeoMode(fakeplayer, 0);

//sleep(0.1);
//flying in
playsoundthing(otonasound, otona, 5, 0, 300, 0x1);
setCameraFocus(0, camera);
MoveToFrame(otona, 1, 10);
WaitForStop(otona);
MoveToFrame(camera, 1, 1);
MoveToFrame(otona, 2, 10);
WaitForStop(otona);
sleep(1.0);
MoveToFrame(otona, 3, 6);
MoveToFrame(camera, 2, 3);
WaitForStop(otona);
Sleep(1.0);
//being inspected
//start of addition
SetThingCurGeoMode(fakeplayer, 4);
SetCameraFocus(0, camera2);
MoveToFrame(door, 1, 8);
WaitForStop(door);
AISetMoveFrame(narpolice, 1);
MoveToFrame(camera2, 1, 2);
WaitForStop(camera2);
MoveToFrame(camera2, 2, 5);
WaitForStop(camera2);
Print("Police: We need to inspect your ship sir, please stand aside.");
Sleep(2.0);
AISetLookFrame(fakeplayer, 0);
AISetMoveFrame(fakeplayer, 0);
MoveToFrame(camera2, 3, 3);
WaitForStop(fakeplayer);
----------------------------------------------------------
AISetLookFrame(fakeplayer, 1);
----------------------------------------------------------
AISetLookFrame(narpolice, 2);
Sleep(.75);
AISetMoveFrame(narpolice, 2);
WaitForStop(narpolice);
AISetLookFrame(narpolice, 3);
AISetMoveFrame(narpolice, 3);
//addition #2
Sleep(1);
SetCameraFocus(0, camera3);
AISetMoveFrame(inspector, 1);
WaitForStop(inspector);
AISetLookFrame(inspector, 2);
AISetMoveFrame(inspector, 2);
WaitForStop(inspector);
MoveToFrame(camera3, 1, 1);
AIsetLookFrame(inspector, 3);
AISetMoveFrame(inspector, 3);
WaitForStop(inspector);
Print("activation????");
AISetLookFrame(inspector, 4);
AISetMoveFrame(inspector, 4);
WaitForStop(inspector);
Print("Inspector: ARREST THAT MAN!!");
//end addition #2
//end of addition
SetCameraFocus(0, Player);
ClearActorFlags(Player, 0xa00000);
SelectWeapon(player, 1);
SetThingCurGeoMode(player, 4);

Return;
# ........................................................................................

end


The bolded part doesn't work and all the frame movements in //addition #2 don't work except the first one and it looks like "inspector" is trying to move to his last frame right after he starts walking, like it runs through all the frames before he reaches the first one.

The camera doesn't change to camera3 arter the //addition #2 part either and I still can't figure out why, but the Print() parts all show up so I know it has to be in the frames.

And parsec comes up with nothing.

[EDIT]Darn DogSRoOL, post while I type why dontchya [http://forums.massassi.net/html/biggrin.gif][/EDIT]

[EDIT2]Forgot that bold doesn't work with code tags, so i just added "----------" before and after the message stated above[/EDIT2]

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"

[This message has been edited by Stormtrooper (edited June 18, 2003).]

[This message has been edited by Stormtrooper (edited June 18, 2003).]
2003-06-18, 8:18 PM #5
Maybe try adding a really short delay after "WaitForStop(fakeplayer);". Like "Sleep(0.1);". Sometimes that works.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
Catloaf, meet mouseloaf.
My music
2003-06-19, 1:57 AM #6
Waitforstop() does NOT work with AI. It is a PATH move type only verb.

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-06-19, 5:21 AM #7
In that case, you'll have to utilize the "arrived" message.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
Catloaf, meet mouseloaf.
My music
2003-06-19, 3:06 PM #8
Arrived: is, alas, also PATH only. [http://forums.massassi.net/html/frown.gif]

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-06-19, 3:35 PM #9
Guess I'll have to use sleep(); then, anyway, thanks for the help.

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"
2003-06-20, 6:26 AM #10
Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Arrived: is, alas, also PATH only.</font>
It certainly is not. I use it all the time. The only thing you can't do is keep track of the ai's current frame. You have to create a variable and keep track of it that way. However, if the ai has designated it's own target and arrives, the message is sent then also. I've only had a problem with that once, though.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------

[This message has been edited by DogSRoOL (edited June 20, 2003).]
Catloaf, meet mouseloaf.
My music

↑ Up to the top!