Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Newbish Question (https://forums.graalonline.com/forums/showthread.php?t=59305)

Maxalou2k 06-06-2005 11:03 PM

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.

Velox Cruentus 06-07-2005 03:01 AM

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.

Maxalou2k 06-07-2005 03:33 AM

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.

Velox Cruentus 06-07-2005 03:45 AM

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.

xAndrewx 06-07-2005 06:22 AM

#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.

Maxalou2k 06-07-2005 10:55 AM

Ok well thanks.

Velox Cruentus 06-07-2005 03:25 PM

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!


All times are GMT +2. The time now is 10:03 PM.

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