• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Are you up for it?

Status
Not open for further replies.
Level 5
Joined
Jan 17, 2009
Messages
97
Need a weapon/spell system done plz

Here is what is happening...
i have a map that has first person view, i want to have it so you can pick up weapons off the floor, and i it does not have to run out of ammo(but it can). i would like like 4 different kinds and then i'd place some randomly. i would like the 4'th one to be rather better then the rest but not to good.

so bassicly its ganna be items but that when u get them u use them as spells in addition to there week attacks

ANY ONE UP TO IT?

if you want to do it just tell me and you could edit it right in the map cus i dont fell like putting them in :xxd:
if you kinda want to see what ur dealing with here is what i have so far of the map.

http://www.hiveworkshop.com/forums/pastebin.php?id=xzcmfl

nobody wants to?
 
Last edited:
Level 4
Joined
May 2, 2009
Messages
69
Well I can help you with what I'm doing on the map I'm working on... And I think I'm answering your question here... But I made 2 spells, one is a no-target (Like war stomp) and one is shockwave type spell. I'm not too great with shortening and perfecting my triggers or abilities, but if you can get it to work, you might be able to make it so the shockwave spell's icon doesn't show. But for me it shows both icons...

1) Make a trigger so when you pick up the item it adds an ability to your unit.
  • Machine Gun
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Machine Gun
    • Actions
      • Unit - Add Fire - Machine Gun to (Hero manipulating item)
      • Unit - Add Straight Fire - Mach Gun to (Hero manipulating item)
      • Set Weapon[1] = Fire - Machine Gun
      • Set Weapon[2] = Straight Fire - Mach Gun
2) Make a trigger so when you cast no-target spell it forces unit to cast shockwave spell towards facing area.
  • Aim Machine Gun
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Straight Fire - Mach Gun
    • Actions
      • Unit - Order (Casting unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards (Facing of (Casting unit)) degrees)
And that should make it so you can shoot well. I needed this because I wanted to make every ability use the keyboard via hotkeys. And because of this there were errors so you could pick up 2 weapons, so I did this.
  • Unable to Pick Up
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • Set Item = 0
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If ((Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))) then do (Set Item = (Item + 1)) else do (Do nothing)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Item Greater than 1
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: You cannot pick up ...
          • Wait 0.05 seconds
          • Unit - Remove Weapon[1] from (Hero manipulating item)
          • Unit - Remove Weapon[2] from (Hero manipulating item)
        • Else - Actions
So this should work with what I believe you asked for... If you didn't mean what I read, plz tell me!
 
Level 4
Joined
May 2, 2009
Messages
69
And I know you asked us to do it in map, but I'm a little busy right now... >.> I just happened to see this as I was looking for an answer to one of my questions, and I decided I might be able to answer you!
 
Level 4
Joined
May 2, 2009
Messages
69
There you go!
Enjoy, and ignore some of the random other stuff i'm doing on the map. :xxd:
 

Attachments

  • Batallion Wars.w3x
    1.9 MB · Views: 53
Status
Not open for further replies.
Top