Page 1 of 1

Script Arguments?

Posted: Sun Dec 08, 2013 7:39 pm
by Fabysk
Since I began map editing, the script(s) line action greets script arguments 1, 2, and 3. I have never used those, but with my question, what does that (or thoes) even do?

RE: Script Arguments?

Posted: Sun Dec 08, 2013 7:40 pm
by Hypnotoad
Passes arguments to the script.

RE: Script Arguments?

Posted: Sun Dec 08, 2013 7:45 pm
by Fabysk
Hypnotoad wrote: Passes arguments to the script.
Could I have an example?

RE: Script Arguments?

Posted: Sun Dec 08, 2013 7:47 pm
by Mr.Man
acs
teleportother(source,target,tag);

arguments
teleportother(argument 1,argument 2,argument 3);

RE: Script Arguments?

Posted: Sun Dec 08, 2013 7:54 pm
by Fabysk
Mr.Man wrote: acs
teleportother(source,target,tag);

arguments
teleportother(argument 1,argument 2,argument 3);
Ohh! Now I see its purpose.

RE: Script Arguments?

Posted: Sun Dec 08, 2013 8:36 pm
by ibm5155
you mean something like acs_execute(script,map,arg1,arg2,arg3)?
It'll call the script X on the map Y (if map = 0, then it'll active the actual map, I never tested with other maps :s), and arg1,2 and 3 are just as a transfer data, here's a example

Code: Select all

script 1 open{
 int monster_tid=10;
 acs_execute(2,0,getactorx(monster_tid),getactory(monster_tid),getactorz(monster_tid));
}

script 2 (int monster_posx, int monster_posy, int monster_posz){
 int tid_new=3;
  spawn("rocket",tid_new,monster_posx,monster_posy,monster_posz);
}

So this will get a generic monster with tid 10, it'll give the cordinates to script 2 that'll spawn a rocket where is he...

Basically it's used to transfer data by each scripts

RE: Script Arguments?

Posted: Sun Dec 08, 2013 8:55 pm
by Fabysk
ibm5155 wrote: you mean something like acs_execute(script,map,arg1,arg2,arg3)?
Yea that. I have seen this within the line actions, such as line action 80 Script Execute