Page 1 of 1

change clone variables help

PostPosted: Fri Mar 30, 2007 11:10 am
by pixelpoop
Hi all,
Help please. I am having trouble changing local variables on clones. On a collision event of one actor I have the following non-functioning code(it doesn't return an error when I OK it in the script editor).
Code: Select all
int n;
Actor *actors;
actors =  getAllActorsInCollision("Event Actor", &n);
if(actors)

    {
  int i;

  for(i = 0; i < n; i++)

  {
 
   actors[i].variable1=5;
   }}

how come variable1 will not change?

PostPosted: Fri Mar 30, 2007 2:04 pm
by makslane
Is the variable1 a internal variable (like x, y, xscreen...) or a variable created by you?

PostPosted: Fri Mar 30, 2007 8:31 pm
by pixelpoop
I want to change the R,G and B values AND change a variable inside some clones. The variable is just an integer create by me. It will just be a 1 or 0.

PostPosted: Fri Mar 30, 2007 11:19 pm
by makslane
I think changing your variable will works, but don't will works for change the internal variables.

Already in my task list solve this problem.