Artillery (Mortar)
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
Artillery (Mortar)
Dont ever ask for help rly but... Not to sure how to code Artillery was wondering if someone could point me in the right direction any help is helpfull.
- Rukiun
- Posts: 2
- Joined: Wed Aug 31, 2011 2:22 am
By Artillery, do you mean a weapon the player fires which arcs over a long distance and explodes powerfully? Or do you mean designating a target and having artillery fire shower the area with projectiles like in World at War and Black Ops?
If its the latter, you could simply check the designated point to see if it is within view of the sky, I think pointcontents might be useful here, and if so you could from that spot in the sky, spawn an entity which faces the target position, and spawns rockets randomly offset from its origins, to get that nice scatter effect, which removes itself after a certain amount of time.
For the weapon the player holds, and this like the previous example is off the top of my head and might be very wrong, you basically just need a weapon launching a MOVETYPE_BOUNCE projectile which is set to explode on contact with anything and give it a high velocity.
Look at W_FireGrenade() and GrenadeTouch() in weapons.qc for some ideas.
If its the latter, you could simply check the designated point to see if it is within view of the sky, I think pointcontents might be useful here, and if so you could from that spot in the sky, spawn an entity which faces the target position, and spawns rockets randomly offset from its origins, to get that nice scatter effect, which removes itself after a certain amount of time.
For the weapon the player holds, and this like the previous example is off the top of my head and might be very wrong, you basically just need a weapon launching a MOVETYPE_BOUNCE projectile which is set to explode on contact with anything and give it a high velocity.
Look at W_FireGrenade() and GrenadeTouch() in weapons.qc for some ideas.
...and all around me was the chaos of battle and the reek of running blood.... and for the first time in my life I knew true happiness.
-

scar3crow - InsideQC Staff
- Posts: 1054
- Joined: Tue Jan 18, 2005 8:54 pm
- Location: Alabama
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest