| 07-06-2004, 11:41 AM | #1 |
The map I am creating uses Eternal Darkness (A gamecube game) type spells. For those of you who havnt seen/played it, To cast a spell you need 3 runes: An Alignment rune. (Red / Blue / Green) A Prefix Rune. (EG: Summon) A Suffix Rune (EG: Creature) The way I have done this is: If the player has picked up (for storyline purposes, i will refer to this as "reading") a rune, it sets the variable that that player has read that rune. Code:
Rune Reading (Player one, Area, Project, and Green).
Events
Unit - A unit Acquires an item
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Item being manipulated) Equal to Area 0000 <gen>
Then - Actions
Set Suffix_Red_Area = 1
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Item being manipulated) Equal to Project 0001 <gen>
Then - Actions
Set Prefix_Red_Project = 1
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Item being manipulated) Equal to Green alignment 0002 <gen>
Then - Actions
Set Align_Red_Green = 1
Else - Actions
Trigger - Run Give Spell (GreenAreaProject)<gen> (checking conditions)Code:
Give Spell (GreenAreaProject)
Events
Conditions
Align_Red_Green Equal to 1
Prefix_Red_Project Equal to 1
Suffix_Red_Area Equal to 1
Actions
Unit - Add GreenAreaProject <ABILITY> to (Triggering unit)What I want to know is, Is there an easier way to give a spell to a hero, checking that they have read (possessed) the appropriate runes first? |
| 07-06-2004, 01:17 PM | #2 |
I see no reason to make it "easier" if it works? Just one note though, in the first trigger you say "Owner of triggering unit", it should be "owner of hero manipulating item". Just to be sure :D And about the trigger: Actually, that trigger wont even be noticable if you are afraid of lag. And if its not LAG you are worried about; what is it? There is no need to make a trigger easier if it works...Maybe if you are gonna add more different combos later, you could make 3 variables called Align_Var, Prefix_var and Suffix_var and make them into arrays. Then you have each different item have their own "number ID", for example the Align could be Align_Var[1] = red, 2 = blue and 3 = green for example. Then each Prefix can also have their own Number ID. This system would make it ALOT easier for you to make new combos. GL luck with the system, i have never played the game but it sounds interesting. For more trigger help, and other triggering stuff, check out my new triggering forums! Link in sig |
| 07-06-2004, 10:49 PM | #3 |
Yeah, The only thing I was worried about was that that is one of about 12 spells, for one of 10 players, so I have to make this trigger with slight variations several times. I was thinking of using arrays, I'll see what I can do about it. |
