Problem with script

Talk about making games.

Problem with script

Postby Ovidiu29 » Mon Dec 09, 2013 9:35 pm

Image
Last edited by Ovidiu29 on Tue Dec 10, 2013 10:35 pm, edited 2 times in total.
Ovidiu29
 
Posts: 2
Joined: Sun Dec 08, 2013 9:46 pm
Location: Romania
Score: 0 Give a positive score

Re: Problem with script

Postby AliceXIII » Mon Dec 09, 2013 10:56 pm

Just call the for loop omit the main function your trying to create, also you should create function's in Global code.

Script editor's on actor action's are generally used for calling function's, general math, comparisons, etc.

One of the biggest problem you have though is that lowercase "x" is a predefined data structure within the actor struct you can't call int x=-260; because x already exist's!

Code: Select all
int i, X=-260; //Acceptable

for(i=1;i<=4;i++)
{
    CreateActor("enemy", "enemy", "(none)", "(none)", X, -360, false);
    X+=30;
}
"Taking a breath of fresh air."
User avatar
AliceXIII
 
Posts: 325
Joined: Fri Sep 17, 2010 2:36 am
Location: victoria, texas
Score: 37 Give a positive score

Re: Problem with script

Postby Ovidiu29 » Tue Dec 10, 2013 8:36 am

Thank you for help!
Ovidiu29
 
Posts: 2
Joined: Sun Dec 08, 2013 9:46 pm
Location: Romania
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest