• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Custom Weapons /w Projectiles & Ammo

Status
Not open for further replies.
I'm almost ready to release my map as a public beta but I want to add a variety of weapons first.

I have tried scripting projectile systems before but it doesn't work because of the timers being too slow n' what not.

So I've been trying to use the data manager but that hasn't been working for me either.

I need the following base weapons:

1. Assault Rifle
2. Shotgun
3. Flamethrower
4. Grenade Launcher
5. Rifle
6. Pistol
7. Chaingun
8. Turret (you'd have to use it with your character it'll not be automated)
9. SMG

There'd be different variants of all the above added later on (as in, after initial release).

Also some explosives
1. Grenade (different types, some could be loaded into grenade launcher).
2. Landmines.
3. etc.

I think I have those down though.

Some features of the weapons would be:
1. Different firing modes (full-auto, single-shot, semi-auto, burst, etc.)
2. Projectiles that can pass through multiple targets.
3. Knockback.
4. Explosions; if they don't instantly kill an enemy it should send them flying through the air and cause even more damage when they hit the ground again. If insta-kill they just blow up.
5. Burn/bleed-out/etc. damage.

Note: I will be using custom dialogs to display ammo and other info about the weapons on the player. I also will be using a custom inventory system.

Note2: Projectiles should be able to keep moving beyond their target if they miss or even stop short of their target if say it hits something inbetween the target and the origin point.

Note3: The weapons would be like those in Afterlife (the WCIII map) but with projectiles like Elimination Tournament II.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
You will need to break weapons down into different types.
Instant ones (which result is immediate) and projectile ones.

The idea is you use mathematics and various checks to tell if a projectile hits something. As long as the targets are not moving stupidly fast every game frame the results should be accurate enough.

Collisions with terrain objects might be detectable using the pathing cost system (if something unpathable (like a big rock) is between you and the target then the pathing cost will be higher).

Collisions with units can be done via various mathimatical or iterative tests (up to you).

Projectiles might need some form of physics attached to their movement. Remember to compensate for such behaviour in your collision tests.
 
Projectile Movement

My biggest problem is moving the projectiles and making the projectiles look ok while in motion. I can't just set the units position every interval so I need to use something in the data manager. Can I attach a behaviour or something that forces a projectile to moveforward at a given pace until either it travels a certain distance / timer expires / collides and the projectile is terminated?
 
Why is blend movement via triggers not suited? You know, the blend flag that the move native takes?

I didn't know what the blend option was for... I shall test this right now.

Do you know if a more spear like search area can be used for collision btw? I'd think a fast moving projectile with a search arena that is real long dragging behind it would be more likely to hit than a projectile with a search area like a marble.

Update: Holy crap blend works. I can pretty much avoid the data manager!

I need to tell this guy on jewtube about this, but I'm banned from jewtube right now... fuuuuuuuuuuuuuuuuuuu-
 
Last edited:
Status
Not open for further replies.
Top