Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-05-2002, 10:29 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Triggeraction Guide

Could someone be kind enough to explain Triggeraction for non-p2p stuff in its fullest content?
Reply With Quote
  #2  
Old 02-05-2002, 10:44 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
triggeraction x,y,name,param;

triggers action "name" at x,y

in the npc at x,y (if any)

if (actionNAME) {
dostuff;
}
Reply With Quote
  #3  
Old 02-05-2002, 01:22 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
triggeraction x,y,action,params,.....;

as said b4 it triggers action "action" at x y. however they failed to mention that you can add params, mostly for p2p stuff..but awww heck...
watch:
NPC Code:

if (playertouchsme) toweapons weapon;
if (playerchats) triggeraction playerx+1.5,playery+2,weapon,name,#c,#a;
if (actionname) setplayerprop #c,#p(1): #p(0);


talk about a loop...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #4  
Old 02-05-2002, 08:12 PM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
both failed to mention that if a player is on the x&y cordinate that you trigger, then they must have the weapon that triggered it (ie. you have a net and you try to catch someone, then they must also have the net)



PS i know this can be worked around, so please dont
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #5  
Old 02-06-2002, 12:08 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
srry ur right i should have mentioned that. thanks
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #6  
Old 02-06-2002, 04:07 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
give me an example plz.
Reply With Quote
  #7  
Old 02-06-2002, 04:17 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
Quote:
Originally posted by royce
give me an example plz.
of what, the way to work around it??
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #8  
Old 02-06-2002, 04:52 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Quote:
Originally posted by TDK_RC6


of what, the way to work around it??

Well what I am trying to script is a job that is sort of like mining. I am working on creating a npc that uses putnpc and uses a random setting to where the ore will be placed, a random setting that determines the type of ore, and another random setting that determines the density/purity of the mineral in percentage. So, I want to learn how to use triggeraction for NON-P2P (if it matters p2p or not) so I can create the pickaxe.
Reply With Quote
  #9  
Old 02-06-2002, 04:56 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
the make the weapon like

triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,minehere;
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #10  
Old 02-06-2002, 05:08 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Quote:
Originally posted by TDK_RC6
the make the weapon like

triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,minehere;
Thanx thats what I needed.
Reply With Quote
  #11  
Old 02-06-2002, 06:49 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
yay! another scripting problem solved by the superheros of the graal2001 forums...lol
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #12  
Old 02-06-2002, 07:39 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
Quote:
Originally posted by Saga2001
yay! another scripting problem solved by the superheros of the graal2001 forums...lol
a superhero??

na
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #13  
Old 02-06-2002, 08:53 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
Quote:
Originally posted by TDK_RC6
the make the weapon like

triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,minehere;
whats vecx and y
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #14  
Old 02-06-2002, 08:57 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
vector of x and vector of y
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #15  
Old 02-06-2002, 09:44 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
Quote:
Originally posted by TDK_RC6
vector of x and vector of y
I know but whats a vector?
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #16  
Old 02-06-2002, 11:43 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
vecx( dir ) vertical movement vector (0,-1,0,1)
vecy( dir ) horizontal movement vector (-1,0,1,0)


__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #17  
Old 02-06-2002, 11:56 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
when the player is up, y is decreasing so vecy = -1, and x is staying the same so vecx = 0

when the player is right, y is staying the same so vecy = 0, and x is increasing so vecx = 1

and so on...
Reply With Quote
  #18  
Old 02-08-2002, 02:36 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Kaimetsu


Well, no. You don't get single-element vectors very often
Someone freaking describe vectors? I read the definition, but it didn't really help me.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #19  
Old 02-08-2002, 02:38 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
nevermind I think i get it more now. Old dictionaries suck.

vec·tor (vktr)
n.

1.Mathematics.
a.A quantity, such as velocity, completely specified by a magnitude and a direction.
b.A one-dimensional array.
c.An element of a vector space.
Source www.dictionary.com
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
Reply


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 08:12 PM.


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