Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-26-2001, 02:20 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
scripting?

Can someone explain how to use and what to use these for?

-Trigger action (I kinda know)
-vectorx and y
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #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
  #3  
Old 09-27-2001, 07:49 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
thanks a lot Falcor
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #4  
Old 09-27-2001, 08:02 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
i still ?

i still dont understand about vecx and vecy what is there purpose ?
Reply With Quote
  #5  
Old 09-27-2001, 09:35 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: i still ?

Quote:
Originally posted by nyghtGT
i still dont understand about vecx and vecy what is there purpose ?
its if you want to move back or forth depending on there direction...

its good for like detecting things right infront of the person or right behind the person ect...
__________________
Thanks,
-KJL
Reply With Quote
  #6  
Old 09-27-2001, 09:44 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
ok

still unsure but ok ...
Reply With Quote
  #7  
Old 09-27-2001, 07:10 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: ok

Quote:
Originally posted by nyghtGT
still unsure but ok ...
well if you go like
NPC Code:

if(playerenters)
timeout=.5;
if(timeout){
playerx+=vecx(playerdir);
playery+=vecy(playerdir);
timeout=.5;
}


that would make the player move the direction he is facing... So if he is facing up it will move him up and if he is facing left it will move him left and same with right and down and so on...
__________________
Thanks,
-KJL
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.