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 → Help needed on AiSetMovePos
Help needed on AiSetMovePos
2001-03-10, 4:21 PM #1
I have been struggling for weeks on this problem, any help would be greatly appreciated. I insert a stormtrooper into my Jed level. I modify his template in master.tpl by by changing his cog to one I have written and eliminating the ai entry. My cog does nothing more than create a refernce to the stormtrooper and then creating a pulse message which tries to move him forward by using AiSetLookPos and AiSetMovePos. However, when I run the level he just sits there. I use a print statement directly before the Ai lines to make sure that the system is reaching that point which it is. I also use a printvector statement to make sure that the system is reading his old and new positions correctly, which it is. Howwever, for some reason he won't respond to these statements. I would greatly appreciate any ideas.
2001-03-10, 5:52 PM #2
Ok, post the cog and template entry and we'll see if we can track the problem down.

Raynar

------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2001-03-11, 3:03 AM #3
Thanks very much for you help.
This is driving me crazy.

Template:
# DESC: Cybernaut Blue
# BBOX: -0.02978572 -0.01917877 -0.1247011 0.02409064 0.06467322 0.0434061
CyberBlue _humanactor thingflags=0x20000400 model3d=st.3do puppet=st.pup soundclass=st.snd cog=CyberBlue.cog maxvel=0.250000 weapon=+elaser health=60.00 maxhealth=60.00 maxthrust=1.00 maxrotthrust=90.00 typeflags=0x1 fireoffset=(0.004800/0.050000/0.012000)

CyberBlue.cog
symbols

message startup
message created
message pulse

thing CyberBlue

vector CurPos
vector NewPos

end

code

startup:
SetPulse(10);
return;

created:
CyberBlue=GetSenderRef();
CurPos=GetThingPos(CyberBlue);
return;

Pulse:
print("sending pulse");
NewPos=VectorAdd(CurPos,'0 1 0');
CurPos=NewPos;
AiSetLookPos(CyberBlue,NewPos);
AiSetMovePos(CyberBlue,NewPos);
return;

end

I have noticed that in the Rbots SDK that the rbots have a things flag of 20000401 but changing this in my template doen't seem to have any effect. I am very perplexed.
2001-03-11, 3:53 AM #4
I think the problem may be that he doesn't have any AI, so the AI commands won't work. Not sure about this, but it may be worth a try. Just create a simple AI file to the specs you want, and give it to the actor.

------------------
Black. His gloves of finest wool.
Black. His codpiece made of metal.
His horse is blacker than a hole.
His pot is blacker than his kettle.

Visit Virus Productions!
"And lo, let us open up into the holy book of Proxy2..." -genk
His pot is blacker than his kettle!
2001-03-11, 11:16 AM #5
Lordvirus is correct. You must have an ai entry in the template, if you want to use the 'ai' verbs.

If you don't want to use the standard stormtrooper ai, just use one of the pedestrian ones.

Don't worry about the thingflags, as they were directly copied from the 'walkplayer' template. Incidentally, you've just shown me where a bug was [http://forums.massassi.net/html/smile.gif]

0x20000000 - generates 'splash'
0x400 - cog linked
0x1 - emits light (damn, that shouldn't be there)

Raynar

------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2001-03-11, 2:01 PM #6
Thank you LordVirus and Raynar!
My cybernauts are alive!
Now I can sleep at night!

Many thanks,

MacGyver

↑ Up to the top!