![]() |
Shooting weapon defnpc!!!
Here is a little NPC that I made to save in your
graall/levels/npcs folder as a text file, defnpcShootWeaopn.txt TONS of shooting/spell stuff can be done with this. Anything that starts at the players position and moves out in a line away form the player. NPC Code: Once it saved, go to Predefined NPCs in Graal. Select the Shootweapon. action: can be anythign from shootarow, putbomb, lay rupee .... direction: playerdir if shooting an arrow type, leave blank if not an arrow. How_much_ammo: what it costs the player to use this item Repeat: how many times to shoot the arrow/how many bombs to lay/explosions to put, etc. If not an arrow, each succesive repetition will be a bit further out form the player. Weapon_name: what the weapon is called when player presses Q and selects it. Have fun! let me know of any errors/comments etc. -Prozac- 2 and a half years of Graal and still going !!! |
Quote:
Though of course if you mean that they should be using playerbombs/playerdarts/etc instead, then you're correct. |
Since there are silly people who will use this instead of coding their own NPC (or modifying this one to their specifications), Kai is right. You should clearly state that Ammotype must be a variable and possibly make another version for stuff like client.zalcores.
|
not to worry
Ok guys, I made a working version that uses strings!
Save this one in graal/levels/npcs folder as defnpcShootWepaonString.txt and have fun! Hint: for action, put: putexplosion 1 this.x,this.y no semicolon or putbomb 1,this.x,this.y and blank out playerdir and increase repeats! fun! NPC Code: |
Re: not to worry
Quote:
|
So basically it is alittle machine gun kind of thing? Or just makes a path? I'll save it when i get home, thanx Prozac.
---Shifter |
| All times are GMT +2. The time now is 09:42 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.