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 → Is this correct?
Is this correct?
2003-04-23, 9:47 AM #1
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
Edward's Cognative Hazards
2003-04-23, 8:42 PM #2
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...
Catloaf, meet mouseloaf.
My music
2003-04-23, 9:09 PM #3
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).]
Edward's Cognative Hazards
2003-04-24, 6:54 PM #4
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...
Catloaf, meet mouseloaf.
My music
2003-04-24, 10:21 PM #5
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
Edward's Cognative Hazards
2003-04-25, 10:42 AM #6
Code:
#=====
//-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.

Quote:
<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).]
Famous last words - "It seemed like a good idea at the time."
2003-04-25, 12:04 PM #7
Thanks for the Code...
The ALBATROSSer, why it is local is because it is being created, and so I put ALBATROSSer=CreateThing()...

/Edward
Edward's Cognative Hazards
2003-04-25, 1:02 PM #8
then if you are creating it you will just need to use CaptureThing and wont need the mask=0x408.

------------------
Famous last words - "It seemed like a good idea at the time."
2003-04-26, 1:12 AM #9
Thanks!
Edward's Cognative Hazards
2003-04-27, 7:34 AM #10
Quote:
<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, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!