Thread: scripting?
View Single Post
  #2  
Old 09-26-2001, 03:56 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
triggeraciton is a combination of hitobjects and callnpc or callweapon


It flags a weapon/npc with certain params.
NPC Code:

triggeraction x,y,actionname,param1,param2,...;



And it is interperated from the other npc wich is triggered.

If the NPC has pixles near that X and Y you selected (showcharacter i think its can be in 0x0 to 3x3 from there x/y though. not sure, never experimented)

so you trigger an NPC with...
NPC Code:

triggeraction 30,30,ihityou,5;


and the npc there responds when the action is given to it based on what you programed it to do.. such as
NPC Code:

if(actionihityou) {
message IVE BEEN HIT FOR #p(0) DAMAGE!!!!! OMG NO!!!!;
}



the flag in the if statement is actionactionname

#p(index) is the value of the Param number sent.

as in my example. #p(0) = 5 but this isSTRING BASED

wich means #p(index) is KINDOF like #s(strname)

If you dont want params you STIL MUST INCLUIDE THE COMMA!

NPC Code:

triggeraction 30,30,ihityou2,;



Get the idea?


Vectorx and y Or dirived from something alot of people used for movement.

it was originally
NPC Code:

dirgo = {0,-1,-1,0,0,1,1,0};


and it was used to move things like this.
NPC Code:

x += dirgo[dir*2]
y += dirgo[dir*2+1]


But now you can just do
NPC Code:

vecx(dir)
vecy(dir)

__________________

subliminal message: 1+1=3

Last edited by Falcor; 09-26-2001 at 04:03 AM..
Reply With Quote