HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

trigger help plz

07-20-2003, 08:14 PM#1
lashin'Puppet
no one has been able to give me a straigh answer. How do i make it so when you type "level ##" it sets all selected hereos to the typed level. how can i do this all in one trigger instead of having to make 99 other..
07-20-2003, 09:13 PM#2
Draco
Melee Initialization
Events
Player - Player 1 (Red) types a chat message containing level as A substring

Actions
Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Hero - Set (Picked unit) Hero-level to (Integer((Substring((Entered chat string), 6, 7)))), Show level-up graphics)

- - -

That would prolly work, but you'd have to do "01" for level one. I also have no idea what would happen if you typed it incorrectly, but oh well. I pretty sure this is waht you want.

:D
07-21-2003, 05:25 AM#3
lashin'Puppet
hmm it still didn't work, maybe il just make a trigger where you can add or lower level.. or does someone got a trigger i can just import of that piece of crap?
07-21-2003, 06:41 AM#4
Crimsongg137
dont listen to him i do this all the time h/o ill get the tigger brb
07-21-2003, 06:47 AM#5
Crimsongg137
ok i got it
event
player-player 1(red) types a chat message contaning -hero 05- as an exact match
actions
hero- set (tiggering unit)hero-lvl 5 hide lvl graphics

u have to do this for every player if u want to give it to every1 also u mite have to change the hero 05 to whatever u wnat thats just an ex. well i hope this works well enough for u
07-21-2003, 01:02 PM#6
wiebbe
dude,

thats sucks,

really, you need 99 triggers if you have 99 levels, and 99 triggers for every player.

What draco posted is ten times, maybe even more better then yours..

yours works perfectly for 1 level, but for more levels it sucks big time :/

sorry to say it like that, but noone should have more then 99 triggers for just a level string.
07-21-2003, 05:10 PM#7
lashin'Puppet
i was doing the whole Type Level 7 thing and it would make selected hereos level 7.. maybe il just do 25 levels to cut back a little bit thanks for help
07-21-2003, 07:51 PM#8
Draco
Ok, first off, my above trigger works perfectly. There is No way, absolutely NO WAY that Crimsongg137 knows waht he is talking about. I updated the trigger one small bit so it doesn't allow you to do it to other players units...

- - -

Your Trigger

Events
Player - Player 1 (Red) types a chat message containing level as A substring

Actions
Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (If ((Owner of (Picked unit)) Equal to (Triggering player)) then do (Hero - Set (Picked unit) Hero-level to (Integer((Substring((Entered chat string), 7, 8 )))), Show level-up graphics) else do (Do nothing))

- - -

If you still can't understand how simple this trigger is, I've attached a map that you can just copy and paste it from. Now, plz don't tell me that I don't know what I'm doing.

:D

[edit]

A few more notes:

1. For it to work for other players, all you need to do is make a event for every player typing the substring.

2. It works if you type "level 1" or "level 01" and it goes up to level 99.

:D