change clone variables help

Non-platform specific questions.

change clone variables help

Postby pixelpoop » Fri Mar 30, 2007 11:10 am

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?
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby makslane » Fri Mar 30, 2007 2:04 pm

Is the variable1 a internal variable (like x, y, xscreen...) or a variable created by you?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby pixelpoop » Fri Mar 30, 2007 8:31 pm

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.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby makslane » Fri Mar 30, 2007 11:19 pm

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.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest