View Full Version : Is this correct?
Edward
04-23-2003, 12:47 PM
Hi!
Just wondering, is this correct?
AISetMovePos(ALBATROSSer,GetThingPos(ALBATROSSer)+ VectorSet(x,y,0));
Or no...
ALBATROSSer = thing
x=((rand()*2.00)-1.00);
y=((rand()*2.00)-1.00);
/Edward
DogSRoOL
04-23-2003, 11:42 PM
Setup looks OK. Is the x and y stuff actually before it, though? Should be...
------------------
May the forks be with you.
There is a great disturbance in my shorts...
Edward
04-24-2003, 12:09 AM
I wasn't sure because Parsec said something about Vector expected, but flex, float, or int found.
What I wanted was for a person to walk in random directions.
And something else Parsec found wierd:
thing ALBATROSSer local mask=0x408
Conflict in symbols...
What on earth does that mean? How do I fix it?
/Edward
[This message has been edited by Edward (edited April 24, 2003).]
DogSRoOL
04-24-2003, 09:54 PM
hmm... hard to know without the cog. I've never gotten an error in the symbols section. Are you sure you have "symbols" at the top of the list?
------------------
May the forks be with you.
There is a great disturbance in my shorts...
Edward
04-25-2003, 01:21 AM
I'm sure I have symbols at the top.
Parsec only says there is something wrong with GetThingPos()+VectorSet() and Local and Mask on the same symbol... Hm... If there is anyone who knows why Parsec does this, it is GBK... I think... Hang on... Who programed this?
[ Sits down, and waits for this person to show his face ]
/Edward
DSLS_DeathSythe
04-25-2003, 01:42 PM
#=====
//-These are the symbols needed...
thing ALBATROSSer=-1
flex x=0.0 local
flex y=0.0 local
vector rand_vec local
vector al_vec local
vector new_vec local
//-This is how to set the random movement...
//-Set up the random move pos...
x = ((rand() * 2) - 1);
y = ((rand() * 2) - 1);
rand_vec = VectorSet(x, y, 0);
//-Get the ALBATROSSer's pos...
al_vec = GetThingPos(ALBATROSSer);
//-Add the vectors...
new_vec = VectorAdd(rand_vec, al_vec);
//-Move the thing to its new pos...
AISetMovePos(ALBATROSSer, new_vec);
#=====
thats the way you would have to do it. sorry i didnt see that earlier.
<font face="Verdana, Arial" size="2">
And something else Parsec found wierd:
thing ALBATROSSer local mask=0x408
Conflict in symbols...
</font>
i think you might have to get rid of the 'local' part there. otherwise you wont be able to tell the cog what the ALBATROSSer is in jed.
------------------
[This message has been edited by DSLS_DeathSythe (edited April 25, 2003).]
Edward
04-25-2003, 03:04 PM
Thanks for the Code...
The ALBATROSSer, why it is local is because it is being created, and so I put ALBATROSSer=CreateThing()...
/Edward
DSLS_DeathSythe
04-25-2003, 04:02 PM
then if you are creating it you will just need to use CaptureThing and wont need the mask=0x408.
------------------
Edward
04-26-2003, 04:12 AM
Thanks!
SaberMaster
04-27-2003, 10:34 AM
<font face="Verdana, Arial" size="2">[ Sits down, and waits for this person to show his face ]</font>
http://forums.massassi.net/html/smile.gif
The reason Parsec tells you there is a conflict is because you're trying to use both mask and local. The other errors are from trying add vectors with the '+' operator, use VectorAdd().
Good luck. http://forums.massassi.net/html/wink.gif
------------------
Author of the JK DataMaster (http://www.geocities.com/sabersdomain/fileframe.html), Parsec (http://www.geocities.com/sabersdomain/fileframe.html), Scribe (http://www.geocities.com/sabersdomain/fileframe.html), and the EditPlus Cog Files (http://www.geocities.com/sabersdomain/fileframe.html).
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.