• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Ammo Gun Reload/Melee or Ranged

Status
Not open for further replies.
Level 1
Joined
Jun 21, 2009
Messages
282
Okay, i'm sorta stuck where I have 2 heroes, a male and a female, and I need both of them to be able to trade off from Melee to Ranged or from Ranged to Melee.

Ranged weapons will require ammo, the ammo based will be from charges of the item, and once the charges hit 0 you can click a magazine to reload the gun to the original state (I don't have this trigger down yet, I hope someone can get that one for me too since i'm not good at ammo/gun triggering)

Both melee and range will give your unit a attachment to your hand or hands like a weapon.

The way you equip the weapon is by pressing the weapon itself, and if you press that weapon again it'll unequip, also I need it so it doesn't do anything when you click another weapon that will give you an attachment/melee and ranged trade off.

Basically I need a ammo system that uses charges on the item with reloadable magazines, melee/range trade off from the weapon item, and gender melee/range units differences.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Okay, i'm sorta stuck where I have 2 heroes, a male and a female, and I need both of them to be able to trade off from Melee to Ranged or from Ranged to Melee.

Ranged weapons will require ammo, the ammo based will be from charges of the item, and once the charges hit 0 you can click a magazine to reload the gun to the original state (I don't have this trigger down yet, I hope someone can get that one for me too since i'm not good at ammo/gun triggering)

Both melee and range will give your unit a attachment to your hand or hands like a weapon.

The way you equip the weapon is by pressing the weapon itself, and if you press that weapon again it'll unequip, also I need it so it doesn't do anything when you click another weapon that will give you an attachment/melee and ranged trade off.

Basically I need a ammo system that uses charges on the item with reloadable magazines, melee/range trade off from the weapon item, and gender melee/range units differences.

SC2 can do this, WC3 cannot. You will need to get a completely customized (or make some crappy leaky homemade system, not preferred) ammo system for the ammo. For the melee, you have to have two different units one ranged one melee. The ability would switch the hero and transfer ammo, health, exp, mana, etc. etc.
 
Level 1
Joined
Jun 21, 2009
Messages
282
all of it is really possible but very complicated...
- For charge system, see my map Fog Horror, it has a charge system in it...
- As for the change status, use bear form abilty, make 2 melee & 2 ranged, see This Map on how it's done, see his ultimate...

But there are 2 heroes that need to be able to turn into the bear form/metamorphisis form, a male hero and a female hero which I need both of them to be able to transform into this form but with just attachments and not model changes.
 
Level 1
Joined
Jun 21, 2009
Messages
282
- you can only change attachments through object editor and special effects (triggers)...
- you cant do this without using bear form and a-like...

this is like wonder twins ability right? when rings combine it can create things?...

Heres an example of what the problem is..

1. Male uses bear form( hand gun ) and turns into himself but with attachment.

2. Female uses the bear form( hand gun ) and turns into male with attachment or bug up.

You can only have 1 alternation transformation unit..

Like this: Normal form = Male, if the female hero uses this item with the bear form(hand gun) ability on it, it'll bug and cause the female to become the male (or someother type of mess up).

I need it so that doesn't happen, also I need it so when you're transformed, you can't transform into other bear forms, and when you click your bear form gun, it'll reload with a magazine. (I guess i'm going to need a item stacking system for this to work).
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
u added 2 bear form to unit?

or just dont maked 1 separate bear form to female too where new unit got same model than female?

if i understand then simple u want transform the male unit to same unit with weapon and female to same unit with weapon, correct me if what i said is wrong.

so actually u must do 2 female, 2 male hero, 1 ranged-1melee

make 2 bear form, 1 to.male and 1 to female, female melee transform to female ranged in with bear form (u set it in object editor), male transform to male and in both case reattach the weapons(not needed if attachment work with item)
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
ok here's my understanding now...

- Male & Female = Both Normal melee units...
- When they have this item, they can transform into a ranged unit (hand gun)...
- But both cant use the same hand gun...

if that's the case then you really need to apply post #3, 4 heroes - 2 normal & 2
ranged...how it's done?, I'll try if I have time...
 
Level 1
Joined
Jun 21, 2009
Messages
282
Yeah both can't use the same handgun item ability because then the male or female will transform into the opposite gender and bug up(unless you can set the normal and alternation unit to the same unit (casting unit) and just add an attachment, that should work but I don't think you can do that, the handgun bearform ability only has 1 normal unit and 1 alternation unit, I don't know how you could make this work.
 
Level 11
Joined
Nov 15, 2007
Messages
781
If the only thing that changes between melee form and ranged form is attack type, you can use attack indexes. Just make the first attack the melee attack and the second the ranged attack, create 2 Orb abilities (Orb of Slow for example); nullify all of the fields except "enabled attack index". One of them will have "1" as the enabled index, the other will have "2", and the heroes will have 0 enabled attacks in the object editor. Now add these abilities to all of your active melee/ranged weapons so that the ranged attack will be enabled for ranged weapons and the melee attack for melee weapons.
 
Level 1
Joined
Jun 21, 2009
Messages
282
What would happen if you have a handgun, and then something else like a shotgun? The unit could use the shotgun and bug himself..?

Okay, i'll see how the system works once your done, thanks for helping me and I hope this is something that'll work for my map, if it does i'll make sure you get credit on it. (Btw, I got the terrain done and the map size is at the max 256x256)

The ammo doesn't have to be in charges, I would just really want them to be.

You can have the ammo as Lumber, if not charges then lumber is fine with me.

But, if you know how, I need it so each gun uses different ammo(item magazine and lumber as ammo), and once you unequip a gun that ammo will be saved into the gun and if you requip that same gun, you'll have that same leftover ammo.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
What would happen if you have a handgun, and then something else like a shotgun? The unit could use the shotgun and bug himself..?

Okay, i'll see how the system works once your done, thanks for helping me and I hope this is something that'll work for my map, if it does i'll make sure you get credit on it. (Btw, I got the terrain done and the map size is at the max 256x256)

The ammo doesn't have to be in charges, I would just really want them to be.

You can have the ammo as Lumber, if not charges then lumber is fine with me.

But, if you know how, I need it so each gun uses different ammo(item magazine and lumber as ammo), and once you unequip a gun that ammo will be saved into the gun and if you requip that same gun, you'll have the same ammo.

at your shotgun thing, hmm, i dont think anybody has ever tried stacking bear forms on top of eachother.

max map size is 480x480

ammo would best be a variable.. (which would make it 1000x more easier for your next sentence)
 
Level 1
Joined
Jun 21, 2009
Messages
282
Okay, I can just put a warning sign in each weapon item to say to not stack the items or else your character will become bugged/glitched.

My map size is only 256x256, i'm not using extended warcraft 3 editor just the regular one.

Best in variable? How would you know how much ammo you would have left?
 
So its like you just change equips when you click the guns?

What you need would be:
-2 new units per gun (one male, one female), since you change ranges with a change in gun
-triggers

For the triggers, you just use the event that a unit uses an item, then first hceck what item it is and if the unit is a male or a female, then maybe drop all his items, use replace unit, then pickup the items
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Okay, I can just put a warning sign in each weapon item to say to not stack the items or else your character will become bugged/glitched.

My map size is only 256x256, i'm not using extended warcraft 3 editor just the regular one.

Best in variable? How would you know how much ammo you would have left?

You could make lumber display the variable
Or give a text message whenever you lose a bullet
Or make an item that shows how many you left
Or do floating text tags over a unit every time he loses a bullet
Or . . .
 
Level 1
Joined
Jun 21, 2009
Messages
282
I see.. is it possible to replace the unit with another unit, using the IF conditions? if male uses the item, then the unit will be replaced with male with handgun? and give him the items, level, stats, etc from the unequipped/other gunned unit?

And just keep doing that with the other guns/weapons, like male with handgun uses the shotgun item, then he will be replaced etc..

I'm not entirely sure if this would work though.
 
Level 1
Joined
Jun 21, 2009
Messages
282
Looks great! I don't know jass however.. thats the thing, I only know GUI.

So can you make it so the mountain king can also do the same thing?

And is there a way to increase damage when you transform? And change a certain thing like for the shotgun it'll do splash damage, machine gun will attack faster.. etc?

Okay I actually really like this system but I don't know how to operate it.

Edit: Also, theres gonna be 2 teams, I will be using the Attributes ability for the 2 males and 2 females just to identify what person is on what team (so like every 5-10 seconds of game it'll run an ally check) so basically what i'm saying is that, is that there is gonna be a male with a team 1 attributes ability, a male with team 2's atttributes ability, and same for the female. There are 2 attributes abilities and whichever attribute ability you have will automatically team you up with that team (team 1 or 2) but this only applies when you choose PVP mode. I'm not sure if this changes anything, but yeah..
 
Last edited:
Level 8
Joined
Dec 9, 2005
Messages
523
Instead of triggering the change itself, just create a small trigger to replace the item depending on the unit handling it. Make 2 similar "gun" items, one marked male one marked female (in the editor). The Male gun transforms the unit into a Ranged Man, the Female gun transforms the unit into a Ranged Woman.

Example:
If Man obtains item
Item equals to GunMale
Then do nothing

If Man obtains item
Item equals to GunFemale
Take objects matching condition [object is GunFemale]
Give item to Man: GunMale

And the opposite for the Woman... voila.
 
Level 1
Joined
Jun 21, 2009
Messages
282
There would still be the problem of other gun items, or the same gun item being actively used, bugging or glitching the unit for lowered or increased damage and stats.

Stacking bear form/metamorphisis is what i'm saying.

Are there a way to prevent this without having to have every hero only able to carry 1 item?

Edit: It seems I was mistaken, you can stack bear form but it doesn't really bug anything up, I was thinking about metamorphisis I guess, anyway.. trying to see if this works.
 
Last edited:
Level 1
Joined
Jun 21, 2009
Messages
282
Ah okay I see, does anyone know about how to create the ammo and reloading system? Like the hand gun can only have up to 7 lumber, each shot will reduce the amount of lumber and when hit 0 you can't shoot anymore. When you use the item hand gun clip it'll reload your lumber back up to 7? And make it so specific guns use specific ammo? Shotgun -> Shotgun Shells. Also save the ammo into the gun once you unequip the item? I'm gonna use the bear form item equipping.
 
Level 1
Joined
Jun 21, 2009
Messages
282
Im capable of making that charge system, but Im gonna pass for that, sorry, I'll just make
your transformation system...
btw, lumber used as ammo is really bad, I suggest using item charges, see my map Fog HOrror
It uses item charges...

I'm using bear form as the transformations, I found that easier so.

Okay i'll check it out..
 
Status
Not open for further replies.
Top