• 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.

Help Please!

Status
Not open for further replies.
Level 9
Joined
Aug 11, 2007
Messages
429
Ok So, I Have This Spot Where Your Running Away From This Boulder, And When You Enter This REgion, A Boulder Spawns And Moves To A Certian Point, The Problem Is, How Would I Make It, So If The Boulder Touches You, You Die, I Tried Going To Events-Units-Units Within Range- But It Only Says "Select a Unit" and Since Its NOt On The Map, I Cant Select It.
 
Level 2
Joined
Aug 12, 2007
Messages
13
You can create an variable which is the unit. If you create the unit you say: Set Variable = last created unit.

I cant explain it very well atm .. you first have to understand what variables are. If you know that, you can do this very easy.
 
Level 2
Joined
Aug 12, 2007
Messages
13
You should first learn about variables.. i cant explain everything to you now, use the search function.. but some simple tips:

You create a Varible of the Type unit. You call it ZOMG.
You create your trigger, you dont choose a unit, you choose the varible ZOMG.
When the unit enters the region, you create your unit (boulder or whatever) and after the unit has been created, you say: Set ZOMG = Last created unit.

Now everything will work .. if you understand variables.
 
Level 9
Joined
Aug 11, 2007
Messages
429
You should first learn about variables.. i cant explain everything to you now, use the search function.. but some simple tips:

You create a Varible of the Type unit. You call it ZOMG.
You create your trigger, you dont choose a unit, you choose the varible ZOMG.
When the unit enters the region, you create your unit (boulder or whatever) and after the unit has been created, you say: Set ZOMG = Last created unit.

Now everything will work .. if you understand variables.



which i dont know how to make the variable, like i go to edit variables>new variable>unit> then wat?

Please HELP

please.......help.....
 
Last edited by a moderator:
Level 5
Joined
Apr 16, 2005
Messages
153
This tutorial will refer to the attached picture at the bottom.

K Figure 1 (Opening the Variable Editor):
Click on that icon in your world editor and it should open up the variable editor.

Figure 2 (Making the Variable):
Click on that icon and lets make your variable, for this tutorial we will be making a unit variable.

Figure 3 (Editing the Variable):
Title your variable (for organization purposes) then select the type of the varaiable (again we are making a unit variable). After that, hit ok until you are back at the main trigger editor menu.

Figure 4 (Lets use it now!)
First, we have to set our variable to something. For this trigger to work, we would need a action and condition but im sure you know how to do that already. Make an action and under General > Set Variable you should find a menu like this. Find your variable in the first option then select the unit or function you want to set the variable to.

Figure 5 (Putting the variable into action):
Now you may use this variable in any action until it is replaced by another unit or function

Tutorial by: Steel_Cold

PS: please note, this was not intended to have errors, but it may contain errors since I did this very quickly.
 

Attachments

  • Variable Tutorial.jpg
    Variable Tutorial.jpg
    52.8 KB · Views: 112
Level 9
Joined
Aug 11, 2007
Messages
429
i still dont get it how to make it so when they touch the boulder, they die, like what would the event be? i got the variable thing down.
 
Level 5
Joined
Apr 16, 2005
Messages
153
Ohhh dude... you just want them to die when they touch the boulder..

just add a permenant immolation ability to the unit you want them to die when they touch

lol
 
Level 9
Joined
Aug 11, 2007
Messages
429
how if its not on the map yet? like when they enter a region, the boulder is created, so i wanted a trigger on the boulder

Event- unit within range 100 of unit - boulder

Action - kill triggering unit


how do i do that?

and i also need it to move to a etain region like

Event- unit - unit enters region

Action- Unit - issue order to unit - order unit to move to (region) but it says select a unit, but i cant since their isnt any of that unit on the map yet

well im goin to bed, il lbe back tomarrow to look.
 
Last edited by a moderator:
Level 9
Joined
Jul 27, 2006
Messages
652
Ahem,
Ever here of permenant immolation with no effect and 999999999 damage per second?
Also you cant use a variable for unit enters range you would need to use Trigger add event and add an event for unit enters range of bolder...
- Hope this helps...
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Like steel cold said: go to object editor, go to abilities, create a new "Permanent Immolation" based on the old one, remove the effects, and set "data - damage something" to 99999. Then go to your Boulderunit in the Unit editor, and add the new ability to your boulderunit.

To your second trigger: you REALLY need to learn about conditions & variables. Anyway, let me explain as good as I can: The italics are my comments, yu should not add them to your trigger

Events - Unit - a unit enters region 001
This will work whenever ANY unit enters a certain region
Conditions - Unit Type comparison - Unit type of (Entering unit) is equal to "Boulder Unit type"
This condition makes it so that this trigger will only work whenever a unit of unit TYPE "boulder" enters region 001
Actions - Unit - issue order targetting a POINT - Order (entering unit) to move to Region 002
This will order ANY unit that enters region 001 that MATCHES the condition (is a boulder) to move to region 002. In other words: if a boulder unit enters region 001, he'll move to region 002

In order to make this trigger work, your boulder unit first has to enter region 001.
If your boulder isn't on the map yet, you need to spawn it first via a spawntrigger. Make sure you spawn it on region 001 or it will not move
 
Level 4
Joined
Jul 30, 2007
Messages
79
your question has been answered in multiple different ways
it is now up to you to figure out how to implement one of these ways to your satisfaction

a simple question like this doesn't really deserve 2 pages and the double post bumps you are giving it
 
Level 9
Joined
Aug 11, 2007
Messages
429
Actually it hasnt been answered, all u guys are telling me is "make a variable and use it" its like wth.
 
Level 5
Joined
Apr 16, 2005
Messages
153
I told you how to use variables because you said you had a problem with them, So i explained the use of varaibles so you could use the first explanation given
 
Level 12
Joined
Feb 1, 2007
Messages
1,092
Alright I will give you step by step directions. If you still fail... god help you =)

THE VARIABLE!
1) Open the trigger editor.
2) Through the trigger editor, open the variable editor. it is like an X on a black square or something like that.
3) Hit the New Variable Button.
4) Now we have some options to customize our variable.
a) The name. Set it to something like Boulder
b) The type. This will be a unit that we are storing so set it to Unit.
c) An array is like a lot of variables rolled into one, soyou could store seven units with one variable instead of seven. we dont need this so dont click it.
5) Now hit the create button and we have avariable!

THE TRIGGERS!
1) Make your new trigger for creating the boulder.
2) Set the actions to whatever you need.
3) Set the conditions to whatever you need.
4) Now, for the actions. The first action will most likely be creating teh boulder. So it will be somehting like Create (1) Boulder for (Player 12) at (Center of) (Boulder Region).
5) Now for our next action, find the Set Variable action, click our variable, then we want to set it to last Created Unit.

For the rest of your actions, you can now access the Boulder variable and it will be talking about your boulder. So for your original question, you can now make it A unit come within 100 of (Boulder Variable). You can also do your other actions after setting your variable, like Order (Boulder Variable) to move to the Center of Boulder Move or whatever you want. With this variable you have the utmost control over this boulder.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
That won't work. You can't use variables in events. At least not in this event. You need to select a SPECIFIC unit in the "unit in range" event.

I already gave you the answer, I don't know how I can explain better. I'll explain it in short though:

Create a new unit type in the object editor, call it "boulder". Next, create a new ability in the object editor, based on permanent immolation and set damage to 99999, add the ability to the "Boulder" abilities.
Everytime a unit comes close to the boulder, he'll die.
To make the boulder move, create a trigger like I have posted before
 
Level 7
Joined
Feb 25, 2007
Messages
286
If the bolder isnt there than just do the trigger:
  • Events: A unit enters <a region before the bolder region>
  • Conditions: unit is equaled to <your unit>
  • Actions: Create 1 <whatever you named bolder> for Player <the enemy> at center of <where bolder is suppost to be>
And theres 2 ways to do this...
Like they said Put perma immolation doing 9999999 damage or you can make another trigger
  • Events: Unit enters <where bolder is suppost to be>
  • Conditions: Unit is equaled to <the unit they are>
  • Actions: Kill (Triggering unit)
Note: You MUST put that condition on there or else it will kill the bolder to!!
 
Status
Not open for further replies.
Top