|
| | #1 (permalink) |
| Banned ![]() Join Date: Jul 2008
Posts: 31
![]() | Hi there i am creating something (not going to tell what but it is a weapon that shoots a bug bait and i need help trying to make it disappear after it hits the ground then spawn a head crap so someone please help me! Thank you, Michael P.S if you need more info then please ask me. here is the main code i want fixed. Code: 1. function SWEP:PrimaryAttack()
2. //Call the throw attack function
3. self:throw_attack ("models/weapons/w_bugbait.mdl");
4. ENT.Model = "models/props_junk/wood_pallet001a.mdl"
5. function ENT:Use(ply)
6. if ply and ply:IsPlayer() then
7. if ply:KeyDownLast(IN_USE) then return end
8. end
9. local zombie = ents.Create("npc_zombie")
10. zombie:SetPos(self.Entity:GetPos()+ self.Entity:GetUp()*10)
11. zombie:Spawn()
12. zombie:Activate()
13. end
14.
15. end
i would like it to through bug bait, then when the bait hits the ground it disappears then a head crab pops out. by the way thanks for your help guys. |
| | |
| Sponsored Links | |
| | #2 (permalink) | ||
| UWSVN Contributor ![]() | Are you trying to actually use that?! Is is supposed to be used in the moongate or actual lua addons?
__________________ Quote:
Quote:
IF ALL ELSE FAILS THEN READ THIS BEFORE MAKING A HELP THREAD Remember to ask me for cpu help if you need it, just pm me with your situation and/or problem code | ||
| | |
| | #4 (permalink) | ||
| UWSVN Contributor ![]() | Well first you need to split that into the actual ent to be spawned and have the swep spawn it where you're looking at.
__________________ Quote:
Quote:
IF ALL ELSE FAILS THEN READ THIS BEFORE MAKING A HELP THREAD Remember to ask me for cpu help if you need it, just pm me with your situation and/or problem code | ||
| | |
| | #5 (permalink) |
| <3 ![]() ![]() Join Date: Feb 2008 Location: London, ON (Canada, eh?)
Posts: 765
![]() ![]() | Yeeeeeeeeeeeah... I used that as an example, not an actual code... And yes, I did get that from the MoonGate thread.
__________________ Signature: WIREMOD WILL NOT WORK ON A PIRATED GMOD! ![]() ![]() MY COLOUR IS BLUE. Post your expressions here: www.wiredexpressions.tk It's my favourite country song. And I hate it. IEF015's got his own website :3 |
| | |
| | #7 (permalink) |
| Member ![]() Join Date: Jun 2008 Location: Cassadaga, New York
Posts: 81
![]() | well there is a npc spawner stool_npcspawner_v2 Download!
__________________ 92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature. 98% of teens smoke, or have smoked before in their life. If you are part of the 2% that hasn't/doesn't, copy this into your sig. [url=http://ubanimator.com][img]http://img98.imageshack.us/img98/9400/userbar668015aq1.gif[/img][/url] |
| | |
| Sponsored Links | |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|