You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.7 replies
Age of Mythology Heaven » Forums » Scenario Design » help with condition "Chat contains"
Topic Subject:help with condition "Chat contains"
posted 21 April 2005 09:27 AM EDT (US)         
I'm having a anoying problem with a trigger and i would like someone to help me... How do I make a loop Trigger without "looping" the effects. I mean, I want to grant the player a meteor godpower whenever the player writes in the chat a certain text, but if I put the activate the loop, the game keeps granting infinite meteors.
posted 21 April 2005 09:38 AM EDT (US)     1 / 7       
Use: "clear chat history" in the effects.
posted 21 April 2005 11:42 AM EDT (US)     2 / 7       
Just add to condition timer: 10 or more and keep loop on then it will work only in every 10 seconds and chats are already gone there by then.
posted 21 April 2005 12:49 PM EDT (US)     3 / 7       
Clear chat history will do it.

What you could do is:

trig: grant meteor
cond: Chat contains ('magic word')
eff: fire event (trig: Reload), grant god power (meteor)

trig: Reload
state: Off
eff: Clear chat history, fire event (trig: grant meteor)

posted 21 April 2005 01:11 PM EDT (US)     4 / 7       
Why do you need that other trigger greyshark there's no purpose for it. Just putting it looped and adding Clear chat history to effects will do the same trick. But it isn't always nice chats just disappear (especially in multiplayer game) so I think just adding Timer to conditions is the best alternative.
posted 21 April 2005 01:21 PM EDT (US)     5 / 7       
I hadn't thought of doing that; well done, now those two triggers I did have been condensed to one.

The problem of using a timer is that, after the trigger has been triggered, the player may have to wait up to, in this case, 10 seconds for the effect to take effect.

It'd better for the effect to take place immediatly after the condition has been met.

How about...

trig: grant if
cond: chat contains ('magic word')
eff: grant power (meteor), fire event (reload)

trig: reload
state: off
cond: timer /s (10)
eff: fire event (grant if)

This way, the god power would be granted as soon as the condition is met, and would not be possible to fire again until 10 seconds later, by which time the 'magic word' will no longer be in the chat history.

One could show a timer on screen so the player knows when they can obtain another god power.

[This message has been edited by greyshark (edited 04-21-2005 @ 01:26 PM).]

posted 22 April 2005 07:29 PM EDT (US)     6 / 7       
You can put that in one trigger. It'd have the same effect. If you need it to not have a timer the first time, try firing it earlier if possible.
posted 24 April 2005 11:31 AM EDT (US)     7 / 7       
ok. i've tested all and i'm yet thinking which is the better option, but thaks you all.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Mythology Heaven | HeavenGames