A [Spell Request] for the pros!

Tooblet

Active Member
Reaction score
6
EDIT: THIS TRIGGER IS SOLVED!

Ok guys, this is how it is; This may be cake for some of you, or for some, it may be impossible (as it is for me :p )
I know these forums are not made for people to just expect others to
"make their map for them".
But trust me, I've searched and scoured through these forums for help.
And also been trying to make this/these spells and triggers for about 3 weeks now, with no success.

OK, So the RPG/Teamwork game I am making needs a spell that can ressurect his fallen allies instantly, and in the way I want it.
Now you may think "geez... this is everywhere on the forums.. such a common lame thing".
But enough talk now...

First off:
This spell has to work with another "system" I want to have, witch is a hero revival timer of 25 seconds.
So when a hero dies, I want him to leave a gravestone/Tombstone (Not a corpse of hero) at the position he died.
So everyone else can clearly see where one of his pals have died.
then ofcourse start the revival timer for that player.

For the actual Spell:
I want it to be based on Infernal or flamestrike.. or something with a targeted Area.
So that the Hero may ressurect the other Heroes from a distance, and also see and choose witch Area he will cast the spell in.
So when he targets an area with say.. 3 tombstones/gravestones in it, The owners of those stones gets revived instantly at the position
of the caster and ofcourse, their revival timers stops for them.

--------

Its not so much more than that I guess.
as I said, it has to work with 8 players and 8 heroes, a third person camera that only follows ONE hero per player. and also a Save/load code.
So I can't have sort of multiple hidden heroes for players as that will mess up alot of things :p
I have a couple of things more to add to it but I have allready figured those out myself.
It does not matter if you solve this enigma with Jass or vJass or GUI, I will still love you.
Huge rep and Cred in my game guaranteed ^^ !!!
Ask if anything is unclear :)
 

Dirac

22710180
Reaction score
147
First of all, create a variable for each player hero (PlayerHero[array1-12])

Event
a Unit Dies
Condition
Dying unit is a hero equal to true
Action
Set TempPoint = Position of Dying Unit
Create 1 tombstone for owner of dying unit at position of TempPoint
call RemoveLocation (udg_TempPoint)

Event
a Unit Starts the effect of an ability
Condition
Ability Being Cast equal to ??????
Action
Pick every unit within 300 of target point of ability being cast matching (unit-type of picked unit is tombstone equal to true) and do (Actions)
Set TempPoint = Position of Casting Unit
Revive PlayerHero[Player number of picked unit] at TempPoint
call RemoveLocation (udg_TempPoint)
Remove Picked unit from the game
Trigger up so your multiboard wont mess up
 

Tom Jones

N/A
Reaction score
437
Something like this may also work:
Trigger:
  • Test
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to *Your Spell*
    • Actions
      • Set Temp_Point = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • -------- The range in the unit group pick below should match the aoe of your spell. --------
      • Unit Group - Pick every unit in (Units within 500.00 of Temp_Point matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is dead) Equal to True) and (((Matching unit) belongs to an ally of (Triggering player)) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Custom script: call RemoveLocation(udg_Temp_Point)
          • Set Temp_Point = (Position of (Picked unit))
          • Hero - Instantly revive (Picked unit) at Temp_Point, Hide revival graphics
          • -------- Time to deal with your revival system. The below timer variable and timer window variable should obviously match the ones from your map. --------
          • Countdown Timer - Pause Revive_Timer[(Player number of (Owner of (Picked unit)))]
          • Countdown Timer - Hide Revive_Window[(Player number of (Owner of (Picked unit)))] for (Owner of (Picked unit))
          • -------- Either destroy the window or recycle it. --------
          • Countdown Timer - Destroy Revive_Window[(Player number of (Owner of (Picked unit)))]
          • -------- Remove the tombstone here. --------
      • Custom script: call RemoveLocation(udg_Temp_Point)
 

Tooblet

Active Member
Reaction score
6
Thanks alot guys, +rep to you both :)

But I don't think this will work however:
Trigger:
  • Unit Group - Pick every unit in (Units within 500.00 of Temp_Point matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is dead) Equal to True) and (((Matching unit) belongs to an ally of (Triggering player)) Equal to True)))) and do (Actions)


Because it will never sence that there is a hero or more there. Cause when heroes die, they dissappear and don't leave anything behind. (one reason for my tombstones thingy). Correct me if I'm wrong though.
I will try both of your suggestions out!

I need to remove the gravestone/tombstones also when a hero ressurects his allies but i'll just add that :shades:

I don't get this part though:
Trigger:
  • Custom script: set bj_wantDestroyGroup = true


I would like to know what Variables and arrays you guys used.
 

Tom Jones

N/A
Reaction score
437
Thanks alot guys, +rep to you both :)

But I don't think this will work however:
Trigger:
  • Unit Group - Pick every unit in (Units within 500.00 of Temp_Point matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is dead) Equal to True) and (((Matching unit) belongs to an ally of (Triggering player)) Equal to True)))) and do (Actions)


Because it will never sence that there is a hero or more there. Cause when heroes die, they dissappear and don't leave anything behind. (one reason for my tombstones thingy). Correct me if I'm wrong though.
I will try both of your suggestions out!

I need to remove the gravestone/tombstones also when a hero ressurects his allies but i'll just add that :shades:
Heroes get hidden at the spot where they die, so I'm pretty sure it'll work.
I don't get this part though:
Trigger:
  • Custom script: set bj_wantDestroyGroup = true

I would like to know what Variables and arrays you guys used.
To prevent a group leak.
 

Tooblet

Active Member
Reaction score
6
aha they do. :) So the only variable I will need is a point variable for the spellcast?
Do they need arrays for all the players and heroes or?
 

Tom Jones

N/A
Reaction score
437
Well, you have a revival system, right? You should implement those variables in the code where I used Revive_Timer (a timer array with size equivalent to number of players) and Revive_Window (a timer window array with size equivalent to number of players).
 

Tooblet

Active Member
Reaction score
6
yeahyeah I get that but I ment for the ressurection part.

Question, when I make those variables for the timers, I set the variable to 0 right?
I mean when I make the variable, "blabla_window[0]" ?
or is it 8? (i have 8 players currently)
 

Tom Jones

N/A
Reaction score
437
yeahyeah I get that but I ment for the ressurection part.

Question, when I make those variables for the timers, I set the variable to 0 right?
I mean when I make the variable, "blabla_window[0]" ?
or is it 8? (i have 8 players currently)
That makes no sense. When you create the variables, the size of the variables should be the same as the total number of players in your map.
 

Tooblet

Active Member
Reaction score
6
Haha I have another retarded question for you :p

I can't find a way to get all those "and" in the boolean condition thingy.
in
Trigger:
  • Unit Group - Pick every unit in (Units within 500.00 of Temp_Point matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is dead) Equal to True) and (((Matching unit) belongs to an ally of (Triggering player)) Equal to True)))) and do (Actions)


How do I get those multiple conditions in there?
 

Emu.Man00

New Member
Reaction score
41
The condition "and" gives the oppourtunity to have 2 conditions. You can set one of them to a condition, and the other one to "and"
Therefore giving you three conditions. (and so on :p)
 

Tooblet

Active Member
Reaction score
6
aha yeah i got that. But I was to blind to find it, but now I did just before u answered :p
Rep all around!
 

Tooblet

Active Member
Reaction score
6
Allright so I tried firstly to make your trigger Tom Jones exactly as you made it and based the thing on Flame strike.
It doesnt work.
Then I tried some modifications to it, adding another variable for the caster and some stuff. Can't post it now cause Im on another computer and don't really remember it.
Anyway, doesn't matter because I failed :p

But then I also tried with a singletarget spell and cast it on a nearby enemy and set the area BIG. It worked for One hero, one time :p
Think i used frost nova..

What I think is the problem is the "within Area of point_variable_for_spell".
I don't think it gets where the actuall point is when you cast a spell like flamestrike with an area of 300..
I'm probably wrong but you guys have any idéas why it wont work?

thanks for all the help so far! :)


EDIT: Another idéa I have is to base it on Inferno, and make the unit that you summon a dummy unit that's hidden, and maybe set the point to that unit, Cause then I would get to target a big Area and the point would be easy. Im unsure though if u can set the point to a unit created by the inferno spell? Can't test it right now as said.
 

Tooblet

Active Member
Reaction score
6
Unsolved and badly needed

Ok guys, I've tried both of your suggestions now. And I've toyed around with them alot, and putting in my own idéas and stuff on how to solve this.
But still no success.

The closest I get and have so far is this:

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Ress TEST
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of (Target point of ability being cast) matching ((((Matching unit) is A Hero) Equal to (==) True) and ((((Matching unit) is dead) Equal to (==) True) and (((Matching unit) belongs to an ally of (Triggering player)) Equal to (==) True)))) and do (Actions)
        • Loop - Actions
          • Set ResserPoint = (Position of (Casting unit))
          • Hero - Instantly revive (Picked unit) at ResserPoint, Show revival graphics
          • Custom script: call RemoveLocation(udg_ResserPoint)
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
              • Then - Actions
                • Unit Group - Pick every unit in (Units within 300.00 of (Target point of ability being cast) matching ((Unit-type of (Matching unit)) Equal to (==) gravesten)) and do (Actions)
                  • Loop - Actions
                    • Unit - Remove (Picked unit) from the game
              • Else - Actions


What that trigger does it, it successfully removes ALL the Tombstones in the area of the spell, but it only ressurects ONE hero - the one that was killed last.

I have no clue why it only ressurects one hero and if it leaks big time.
I would really appreciate if someone solved this riddle once and for all, And I sure as hell know alot of people would like to see a well made ressurection spell out there.

Anyways. Come with idéas and stuff, i'll eventually try about anything, and it doesn't matter if it's super complicated stuff, then i'll learn more. :)
 

eXirrah

New Member
Reaction score
51
Try that one...

Trigger:
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set TempPoint = (Target point of ability being cast)
      • Set TempGroup = (Units within 512.00 of TempPoint matching (((Unit-type of (Matching unit)) Equal to Footman) and (((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to True)))
      • Set TempForce = (All players)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Picked unit)) is in TempForce) Equal to True
            • Then - Actions
              • Countdown Timer - Start Revive_Timer[(Player number of (Owner of (Picked unit)))] as a One-shot timer that will expire in 0.05 seconds
            • Else - Actions
          • Player Group - Remove (Owner of (Picked unit)) from TempForce
      • Custom script: call DestroyForce(udg_TempForce)
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)
 

Tooblet

Active Member
Reaction score
6
eXirrah, that spell doesn't really make sence to me, and I want it to be based on Flamestrike.
BUT!! Now I've made triggers that really works well.
The only problem now is to optimize them and make them leakless witch I have no idéa on how to do! So if anyone can help, i'd send some love ^^

So these are the triggers I have That works properly:

Setting some variables:
Trigger:
  • Events
    • Map initialization
    • Conditions
    • Actions
      • Set unit_groupress[1] = (Units owned by (Picked player) matching ((((Matching unit) is A Hero) Equal to (==) True) and ((((Matching unit) is Dead) Equal to (==) True) and (((Owner of (Matching unit)) controller) Equal to (==) User))))
      • Set unit_groupress[2] = (Units owned by (Picked player) matching ((((Matching unit) is A Hero) Equal to (==) True) and ((((Matching unit) is Dead) Equal to (==) True) and (((Owner of (Matching unit)) controller) Equal to (==) User))))
      • Set unit_groupress[3] = (Units owned by (Picked player) matching ((((Matching unit) is A Hero) Equal to (==) True) and ((((Matching unit) is Dead) Equal to (==) True) and (((Owner of (Matching unit)) controller) Equal to (==) User))))
    • -------- And so on for 8 players and heroes --------


When the hero dies:
Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to (==) True
    • Actions
      • Unit - Create 1 gravesten for (Triggering player) at (Position of (Dying unit)) facing Default building facing (270.0) degrees
      • Set Gravestenarray[(Player number of (Owner of (Dying unit)))] = (Last created unit)
      • Unit - Make (Last created unit) Invulnerable
      • Unit - Turn collision for (Last created unit) Off
      • Unit Group - Add (Dying unit) to unit_groupress[(Player number of (Owner of (Dying unit)))]


I wanted the Gravestones to have locust ability so you couldnt click on them, But I needed to be able to kill them so that didn't work out.

Casting the spell:
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Ress TEST
    • Actions
      • Set ResserPoint = (Position of (Casting unit))
      • Unit Group - Pick every unit in (Units within 300.00 of (Target point of ability being cast) matching ((Unit-type of (Matching unit)) Equal to (==) gravesten)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)


And lastly the actual reviving of the heroes, properly working for all 8:
Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (==) gravesten
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to (==) Gravestenarray[(Player number of (Owner of (Dying unit)))]
            • Then - Actions
              • Unit Group - Pick every unit in unit_groupress[(Integer A)] and do (Hero - Instantly revive (Picked unit) at ResserPoint, Show revival graphics)
            • Else - Actions



If anyone have any suggestions on how to make this maybe a bit smoother or if you see instantly that there's one or more things that will bug or make the map laggy cause of leaks tell me.
Also tell me what to do in order for it to work as it should :)

EDIT: noticed that I created the Gravestone for triggering player.. changed that to (Owner of(Dying Unit)). don't know if that matters at all but changed it anyway :p

Also I noticed that I only needed to cast the spell on ONE stone in order for ALL heroes to revive, Solved it easily by changing trigger to:
Trigger:
  • Stone Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (==) gravesten
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to (==) Gravestenarray[1]
        • Then - Actions
          • Unit Group - Pick every unit in unit_groupress[1] and do (Hero - Instantly revive (Picked unit) at ResserPoint, Show revival graphics)
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to (==) Gravestenarray[2]
        • Then - Actions
          • Unit Group - Pick every unit in unit_groupress[2] and do (Hero - Instantly revive (Picked unit) at ResserPoint, Show revival graphics)
        • -------- And so on for 8 players and heroes --------
 

eXirrah

New Member
Reaction score
51
If you have the system with the revive countdown timers then just when you cast the spell, except for creating a separate revive system for the spell, just change the timer's time to 0. The point is ... that when the timer expires the hero is revived, and except creating a complicate trigger to revive the hero through spell, just use the spell to set the time that hero has to wait to be revived to 0.

That was my idea... I wasn't sure how exactly to set the time of a cd timer so I used the function start timer. I never tested it but I believe it works that way.

EDIT: The trigger I pasted is an example trigger you just need to change Animate Dead to Flame Strike based spell and Footman to Tombstone
 

Tooblet

Active Member
Reaction score
6
Aha yeah i get it now.
Even if my spell works perfectly i'll try your theory out.
The thing is now I don't use timers anymore haha :D
Instead I have a dialog box showing up when a hero dies for that player.
With different locations to revive his hero in.

I found that worked better along with my map.
Imagine you fight a big bad boss. and someone dies. And the healer class wants to ressurect him but that spell is on CD.
Then if there were to be a timer, the hero that died would then revive at a completly different location when that timer expires,
maybe far as hell away.

Better to just leave it up to him, so he can wait for a ressurect :)
That way the other guys can maybe finnish off the boss, and THEN he might ressurect his mates :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top