HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Troubles...

07-29-2002, 01:54 PM#1
iceslushee
Ok I know a lil bit about doing the whole map thing but i have a couple of things i really need cleared up. Don't harrass me if its been already answered just point me to it if it has been said before.
1. I want to have a Necromancer type chr but using another model thats fine i can make custom units but i want it to be able to spawn units from say a corpse similar to the necro but usin a dif model once again. In my map there are several skeletons already so i dont want to change the origanal is there a way around this?
2. Town Portals, they are a real drag but can u use any type of item and make it recall a hero to a certain point similar to the tp effect and how can you do this?
3.I want to make a counter for a bunch of hostiles and make it like a leader board but count down instead of up i think i can do this on my own but if you could point it out for me it would be a big relief too

Thanks alot for taking the time to hear me out hope you can help and like my ideas :)
07-29-2002, 02:17 PM#2
Guest
2.
Well, You could always create a new custom item, and a trigger that when that item is used by a hero will move the hero (and maybe other units within range?) to a certain area without much problems.

Event Hero uses Item
Condition Item-type Comparison of your item type
Action move unit instantly to center of your area.

unit will be Triggering unit or something like that, I don't have WE near to check it out.

For point 1 I don't exactly understand your problem so I can't help you, sorry.
And for 3 there is a great tutorial on the webpage, maybe it could help you.
07-29-2002, 03:12 PM#3
Guest
Quote:
Originally posted by iceslushee

1. I want to have a Necromancer type chr but using another model thats fine i can make custom units but i want it to be able to spawn units from say a corpse similar to the necro but usin a dif model once again. In my map there are several skeletons already so i dont want to change the origanal is there a way around this?

Step 1:

Get the Enhanced World Editor from the Mapmaking Tools forum.

Step 2:

Create a Custom Unit with the name "Raise Dead" (preferably something that is not normally trainable, so that it has no built sound). Also, change the tooltip to whatever you want the spell's tooltip to be. And give it a skeleton interface icon.

Step 3:

Give your Necromancer unit the ability to train "Raise Dead"s.

Step 4:

Trigger time.

Trigger- RaiseDeadManaCheck

Events-
Event- Player-Owned Unit Event
A unit owned by player [whoever owns the Necromancer... btw, you can only really have one at a time; having more than one really screws up the triggers] finishes training a unit.

Conditions-
Condition- Unit-Type Comparison
Unit-Type of (Triggering Unit) is equal to (Necromancer)

Actions-
Action- Remove Unit
Remove (Trained Unit) from the game.
Action- If/Then/Else

If

Condition-Real [or it might be integer] Comparison
(Current Mana of (Triggering Unit)) is greater than or equal to [However much mana you want the spell to cost... make sure you include that info in the tooltip]

Then

Run trigger RaiseDeadCast (checking conditions)

Else

Run trigger RaiseDeadNoMana (checking conditions)


Trigger- RaiseDeadNoMana

Actions-
Action- Game- Text Message (Auto-Timed)
Display for [whoever owns the Necromancer] the text [whatever... just tell him he doesn't have the mana]
[also, you can generate a variable for the "Not Enough Mana" sound (which is hard to find... look for a subfolder called "Warnings") and play it, though it might play it for all players; I'm not sure]


Trigger-RaiseDeadCast

Actions-
Action-If/Then/Else

If

[there are corpses near the Necro.... you're on your own here, I can't think of a way to check it off the top of my head]

Then

Run Trigger RaiseDeadCast2

Else

Run Trigger RaiseDeadNoCorpses


Trigger- RaiseDeadNoCorpses

Actions-
Action- Game- Display Text Message (Auto-Timed)
Display for [owner of necro] the text [whatever]


Trigger-RaiseDeadCast2

Actions-
[remove the corpses.... I seem to remember there being a way to do this, but I can't think of it... again, you're on your own]

Action-Unit-Create Unit facing point
Create [however many] [whatever unit you want it to make] [the rest of the stuff doesn't matter]

Action-Unit-Set Unit Mana (to amount)
Set mana of (Necromancer) to ((Mana of (Necromancer))-[however much you want it to cost])

Action- Player- Set Availability of Unit
Make [the Raise Dead unit] unavailable for training by [whoever owns the Necromancer] [This will make the button disappear... make sure to warn the player that when this happens, it's just recharging... you should probably put that in the tooltip.

Action-Countdown Timer-Start Countdown Timer
Start timer as a (One-shot) timer that will expire in [the recharge time of the spell]

Action-Set Variable
Set RaiseDeadRecharge = Last Created Countdown Timer


Trigger- RaiseDeadRecharge

Events-
Event- Countdown Timer Expires
(RaiseDeadRecharge) expires.

Actions-
Action-Set availability of unit.
Make [the raise dead unit] available for training by [owner of the Necromancer].



WOW that was long... I think that should do it.
07-29-2002, 11:12 PM#4
iceslushee
Thnx alot guys I tried both and got a bit of understanding for it but unfortunately it didnt give the results i was after

1. What i really want is to have like a necro that can raise skeletons archers or a chr like the necro.. Is it possible to take the timers off summoned units so they dont die after a set time?

2. I couldnt actually locate the Event - Hero uses Item
so i was a bit stuck if you could help me out probably point me to the half obvious it would make a big difference to me

Any more replies would be much apreciated as i am trying to make several projects at once hopefully i can use you tips and suggestions
07-29-2002, 11:36 PM#5
Guest
Quote:
Originally posted by iceslushee
1. What i really want is to have like a necro that can raise skeletons archers or a chr like the necro.. Is it possible to take the timers off summoned units so they dont die after a set time?

That's exactly what the stuff in my post does. It creates a custom spell, if you will, for a unit, that's complete with custom tooltip, mana cost, and recharge time. It does exactly the same thing as the Raise Dead spell. And the units you "summon" with it don't have a timer.
07-30-2002, 06:47 AM#6
iceslushee
In an action, what is a corpse a decaying unit or a dying unit?
07-30-2002, 07:25 AM#7
iceslushee
Ok this is all i get i made a couple of if statements to see if the corpse is a decaying or dying unit it isnt so umm see what i got and maybe u can shed some light

http://pillbox.no-ip.com/~treznor/necrotest.w3m
07-30-2002, 05:31 PM#8
Guest
instead of training units, what if you made it into a shop that sells the units...
then it wil have no training time, and you can use the stock recharge time for the spell cooldown..

also, if u put all the if statements into 1 trigger (need custom text) you can prolly make it work for multiple necros too..

this sounds like a fun challenge :)
07-30-2002, 05:48 PM#9
Guest
here is how to find dead units within range

unit group - pick every unit in (region) and do
(
if (boolean expression - (picked) unit is dead) is true, then
do that raise corpse thing
skip remaining actions
else
do nothing
)

and for (region) you can have:

converion point with size to region
point is (position of unit (ur necro))
and size is the size u want it to look for corpses

-----------------------------------

if you do not want to go into custom text, you can also make an empty unit group.

and the action, add the unit into the unit group

then later on raise random unit in unitgroup (where the unitgroup would all be corpses)

and to remove a corpse you just 'remove' the dead unit..
07-30-2002, 08:33 PM#10
Guest
Quote:
Originally posted by ogz
instead of training units, what if you made it into a shop that sells the units...
then it wil have no training time, and you can use the stock recharge time for the spell cooldown..

Because then you have to cast it from the building (with my way, the unit actually has the icon of the spell on its command card, as if it were an actual spell). Plus, you can just set the build time of the unit to 0 anyway.
07-31-2002, 07:38 AM#11
Guest
u can make units be able to sell buildings...
07-31-2002, 10:29 AM#12
iceslushee
Blank could you submit a copy of your trigger b/c i cannot get my head around it
07-31-2002, 06:46 PM#13
Guest
I think just creating a new unit off something with no sound, like the marine, changing him to be exactly like a skeleton, then changing the normal skeleton to be like the unit you want the necro to create would be a lot easier. Then just replace all the old skeletons with the "new" ones. Just a suggestion, seems to be the easiest way
08-01-2002, 08:08 AM#14
iceslushee
http://wc3campaigns.com/uploads/Ston...id/tptests.w3m

This is another test i got the tp scroll item its a health potion cos u can use it without target and only effect is heal,

theres a problem tho when u use the item u get sent to a "TOWN" area and there are several circles of power around u each is supposed to have a color to signify the player it belongs to one of the circles is supposed to be grey instead of your color "red" b/c it was moved to where your unit last stood.

Now when another player goes into that grey circle they appear where u used the item and where your colored circle is they can also use it to go back without using an item, but if u go in the grey circle it is replaced by the red one and u appear with no circle to go back to the "town" area.


----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
What i proposed here is the closest i could think of to a diablo2 TP system where u dont need to select a town and u can go back to where u left instantly thru triggers. Believe me i have tried exhaustively to get it to work but it seems u have to create a new circle each time but circles behave like units so if another circle appears in the region of the old one it gets teleported aswell i have used doodads and terrain but nothin so have a look and get back to me plz
08-31-2002, 06:27 PM#15
Thunder-Hunter
oh come on

just use the replace trigger

--Trigger--
Event: Periodic (.01 seconds)

Action: Pick every skeleton warrior (the ones from the spell) and replace with (custom unit) (u gotta make u own skely)

Duh!