Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2013-01-25 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
January 24, 2013, 07:07:57 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Coding explosive bullets  (Read 86 times)
Remy Lebeau
Full Member
***
Posts: 172


View Profile
« on: December 30, 2012, 03:46:52 PM »

So I want to make a tank race that fires very slowly, but it's bullets are basically "shells" (ie, explosives).

I'm not really sure even where to start ... Is it possible to basically make a gun fire he grenades?  Or is there a way of tracking where bullets hit and creating a small explosion there?

Any ideas / help appreciated Cheesy
Logged
Revan
Sr. Member
****
Posts: 346



View Profile
« Reply #1 on: December 31, 2012, 05:02:56 AM »

Yes, both of the methods you described should work.

if you want real projectiles take a look at Glider's Grenadier.
But tracking bullets hit is probably the best & easiest way.
example:
Code:
HookEvent("bullet_impact",BulletImpact);

public BulletImpact(Handle:event,const String:name[],bool:dontBroadcast)
{
     new Float:Origin[3];
     new client = GetEventInt(event,"client");
     Origin[0] = GetEventFloat(event,"x");
     Origin[1] = GetEventFloat(event,"y");
     Origin[2] = GetEventFloat(event,"z");
     // TE_SetupExplosion..... :D
}
Logged

#war3source
Remy Lebeau
Full Member
***
Posts: 172


View Profile
« Reply #2 on: December 31, 2012, 05:31:46 AM »

sweet - didn't realise it was that easy Cheesy  thanks!

For future reference - anyone else who needs it, here's a list of all CSS events

http://wiki.alliedmods.net/Counter-Strike:_Source_Events

You can get events for most games here:
http://wiki.alliedmods.net/Game_Events_%28Source

Note to self: look there first next time!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!