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 03-18-2005, 04:11 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Triggeraction

I'm trying to trigger an action on a character NPC when a timer runs down. Heres what i have in the triggering NPC.

NPC Code:

]if (created) {
timeout = 20;
}

if (timeout) {
triggeraction 28,12,go,;
}



The co-ordinates are correct too because i've put x=28; y=12; in the NPC witch the action should be triggered.

I read in another thread that something different needs to be done for character NPCs... but I diddnt understand what. What i have works if the NPC is not a showcharacter; NPC if i put in setshape as I read in another thread.

Can someone tell me what needs changing to make it work for showcharacter NPCs?
Reply With Quote
  #2  
Old 03-18-2005, 04:34 PM
I_Eat_Plastic I_Eat_Plastic is offline
Registered User
I_Eat_Plastic's Avatar
Join Date: Jan 2002
Location: United States, Texas.
Posts: 219
I_Eat_Plastic is on a distinguished road
Send a message via AIM to I_Eat_Plastic
Well, I'm not sure if this is right but you might need setshape (like setshape 1,32,32) to give the NPC some area to triggeraction onto. Then you might want to change your x and y to 28.5 and 12.5, so you are sure it is triggeractioning onto the NPC.
__________________
#gscript @ freenode.net
Reply With Quote
  #3  
Old 03-18-2005, 05:19 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
If i use setshape on the NPC it seems to remove all the props. Dont characters have a shape?
Reply With Quote
  #4  
Old 03-18-2005, 06:10 PM
Sildae Sildae is offline
Elven sorceress!
Sildae's Avatar
Join Date: Dec 2001
Location: Lothlòrien
Posts: 159
Sildae is on a distinguished road
Quote:
Originally Posted by JkWhoSaysNi
Can someone tell me what needs changing to make it work for showcharacter NPCs?
Yup.
The triggeraction needs to hit a part of the NPC that is blocking, not its actual coordinates. On showcharacter NPCs, the top left corner does not block, just like players.

I suggest to triggeraction to the NPC's x+1.5,y+2. This should hit the center of the NPC's blocking part.
__________________
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."
-- George Bernard Shaw
Reply With Quote
  #5  
Old 03-18-2005, 06:26 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Thanks! Got it working now
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 05:25 PM.


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