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 06-06-2005, 11:03 PM
Maxalou2k Maxalou2k is offline
Registered User
Join Date: Aug 2004
Posts: 12
Maxalou2k is on a distinguished road
Unhappy Newbish Question

Err, hi.
I may(it WILL) sound newbish but...
How do you guys do so when we grab an NPC it goes into your inventory? I searched but i cant find anything... Thanks.
Reply With Quote
  #2  
Old 06-07-2005, 03:01 AM
Velox Cruentus Velox Cruentus is offline
Registered User
Velox Cruentus's Avatar
Join Date: Dec 2004
Location: Quebec, Canada
Posts: 465
Velox Cruentus is on a distinguished road
Send a message via ICQ to Velox Cruentus Send a message via AIM to Velox Cruentus
Make it so that when the animation if grab, that it sends a trigger in front of the player. Then, on the NPC, make it so that if the trigger is recieved, to add it to the player.
__________________
In a world of change... Who'll you believe?
Reply With Quote
  #3  
Old 06-07-2005, 03:33 AM
Maxalou2k Maxalou2k is offline
Registered User
Join Date: Aug 2004
Posts: 12
Maxalou2k is on a distinguished road
Could you give me a sample? I dont know much of scripting. I dont want anyone to do the work for me. Just an example. Like, hem, a rock? You grab a "Emerald" or anything. Thanks again.
Reply With Quote
  #4  
Old 06-07-2005, 03:45 AM
Velox Cruentus Velox Cruentus is offline
Registered User
Velox Cruentus's Avatar
Join Date: Dec 2004
Location: Quebec, Canada
Posts: 465
Velox Cruentus is on a distinguished road
Send a message via ICQ to Velox Cruentus Send a message via AIM to Velox Cruentus
First off: You'll want a periodic check on the animation. Each check, you have to see if he has the animation "grab". If he does, then triggeraction 'grabbed' to the location where the NPC would be.

On the NPC, have it so when the triggeraction is recieved, then the weapon is added.
__________________
In a world of change... Who'll you believe?
Reply With Quote
  #5  
Old 06-07-2005, 06:22 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
#m,grab; //This is the player grabbing the item
triggeraction grab,vecx,vecy; //The triggeraction calling the NPC 'grab' (Not a finished triggeraction)
Item NPC: if (actiongrab){ //recieving the triggeraction
That's basically what you need. I'm not giving you anything else.
__________________
Reply With Quote
  #6  
Old 06-07-2005, 10:55 AM
Maxalou2k Maxalou2k is offline
Registered User
Join Date: Aug 2004
Posts: 12
Maxalou2k is on a distinguished road
Ok well thanks.
Reply With Quote
  #7  
Old 06-07-2005, 03:25 PM
Velox Cruentus Velox Cruentus is offline
Registered User
Velox Cruentus's Avatar
Join Date: Dec 2004
Location: Quebec, Canada
Posts: 465
Velox Cruentus is on a distinguished road
Send a message via ICQ to Velox Cruentus Send a message via AIM to Velox Cruentus
A little more and it'd come in a gift box. I wish I get a box of computer parts to mount without instructions... These are rather entertaining!
__________________
In a world of change... Who'll you believe?
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 04:57 PM.


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