Script Arguments?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

Script Arguments?

#1

Post by Fabysk » Sun Dec 08, 2013 7:39 pm

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?
Image Image Image

User avatar
Hypnotoad
Retired Staff / Community Team Member
Posts: 528
Joined: Tue May 29, 2012 8:50 pm
Location: Britland

RE: Script Arguments?

#2

Post by Hypnotoad » Sun Dec 08, 2013 7:40 pm

Passes arguments to the script.

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: Script Arguments?

#3

Post by Fabysk » Sun Dec 08, 2013 7:45 pm

Hypnotoad wrote: Passes arguments to the script.
Could I have an example?
Image Image Image

Mr.Man
Forum Regular
Posts: 657
Joined: Thu May 09, 2013 7:25 pm

RE: Script Arguments?

#4

Post by Mr.Man » Sun Dec 08, 2013 7:47 pm

acs
teleportother(source,target,tag);

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

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: Script Arguments?

#5

Post by Fabysk » Sun Dec 08, 2013 7:54 pm

Mr.Man wrote: acs
teleportother(source,target,tag);

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

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: Script Arguments?

#6

Post by ibm5155 » Sun Dec 08, 2013 8:36 pm

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
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: Script Arguments?

#7

Post by Fabysk » Sun Dec 08, 2013 8:55 pm

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
Image Image Image

Post Reply