HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Simple Question

11-24-2003, 03:57 AM#1
ChaoticPeasant
EDIT: What I need is a function for a condition to define a spell in "(Learned Skill) Equal to (My Spell)" I do not want to use a 3rd party editor to do this, so people are able to open this. Must be done in normal WE. (Old replies won't make sense, as I didn't explain my problem clear enough before).
11-24-2003, 09:53 AM#2
Cacodemon
2 ChaoticPeasant:

You don't need JASS in your map for this trigger. Why don't you try this?

Event: Unit is killed.
Condition: (Dying unit) is equal to (your Hero)
(RandomReal(0,100) > 50) is equal to true
Actions:
Wait(0.5)
Unit - Revive (Dying Unit)

I don't remember GUI triggers allow using GetRandomReal() in conditions or not. If they don't, use following example:

Event: Unit is killed.
Condition: <none>
Actions:
if ((RandomReal(0,100) < 50) is equal to true) then (Skip remaining actions) else (Do Nothing)
Wait(0.5)
Unit - Revive (Dying Unit)
11-24-2003, 12:09 PM#3
ChaoticPeasant
I did need JASS, as I need to specify a spell for a trigger that shows the hero has learned the ability, because I just don't want any old hero to be able to revive, I want the hero with the spell to revive. I still need help, can someone please download the map and tell me what is wrong?
11-26-2003, 07:06 PM#4
JTG
Another way to look at it...

Events
|A Unit becomes revivable.
Conditions
| Dying unit equal to My Hero
| Dying unit has learned skill My Skill
Actions:
| Wait 0.5 seconds
| If Random real between 0 and 100 greater than or equal to 50
| | then
| . Unit - Revive Revivable Hero at Revival Spot
| | else
| . Do Nothing

This way he won't revive until he is actally dead and his essence fades. Like how your hero shows up unavailable at first for revive then, ungrays.
11-26-2003, 07:59 PM#5
ChaoticPeasant
Quote:
Originally posted by JTG
Dying unit has learned skill My Skill
That's the thing, there is no custom spell is learnt indicator for GUI in regular WE, and I want this to be done i regular WE solely.... I tried just makign it the default blizzard, converting to JASS, and typing in A000 over the blizzard value, but that wouldn't work either.
11-26-2003, 08:04 PM#6
JTG
Create a trigger with the event of your hero learning the skill that sets the ability as a variable. As aa second event for the SAME trigger put the unit dies events. If it doens't work respond again.
11-26-2003, 09:53 PM#7
ChaoticPeasant
Quote:
Originally posted by JTG
Create a trigger with the event of your hero learning the skill that sets the ability as a variable. As aa second event for the SAME trigger put the unit dies events. If it doens't work respond again.

Sorry, I don't think I've been clear enough on what I'm trying to say.
(This is not meant to sound rude, just want to make my point clearer.)

I cannot set (Learned Hero Skill) Equal to My Spell

I need a JASS function that gets my custom spell, and yes I've converted it and changed the blizzard code to "A000", my spell code, but it does not work. And as I cannot do this either, your method as posted above wouldn't have worked.... that is the only part I need help on. The rest I have configured in a variable array for making the percentage higher.
12-08-2003, 11:17 PM#8
JTG
Post a reply with your map and I'll take a physical look at it, maybe then I can figure out the problem and resolve it more quckly.