HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

a few first time trigger problems

07-24-2004, 02:39 AM#1
NueRoN-X
Alright guys i just got back from a long while not playing warcraft .. and this is my first experiment with triggers .. and i think im doing pretty well its just that i have a couple problems ..

problem 1: i need to know how to make a countdown timer .. cause when the timer expires . . the player gets 1000 gold ..

problem 2: i tried creating leaderboards like in all hero arenas .. but i am confused on how to do this .. do i have to make a multiboard for team 1 and team 2 kill counts ? and how do i make this only apply to other players and not to creeps?

If this is in any of the stickies .. i am sorry for making this thread and wasting bandwidth..

Of course any help is appreciated =)
07-24-2004, 03:21 AM#2
Rafael Br
1-make a variable for the timmer, and one for the timmer window, if you wish one, then on the trigger that you wish to start the timmer, do this action:Countdown timmer- Start (your timmer) as a one-shot timmer that will expire in (how much seconds) and this other action for the timmer window:Countdown timmer-Create a timmer window for (your timmer), then show the timmer window.Then, make another trigger with the "timmer expires" event, then add gold to it, and destroy the timmer window.
2-This is easily done with a leaderboard, do this trigger
Event-Time - Elapsed game time is 0.50 seconds
Actions-Leaderboard - Create a leaderboard for (All players controlled by a User player) titled Scoreboard
For each (Integer A) from 1 to (Number of players), do (Actions)
Loop - Actions
Leaderboard - Add (Player((Integer A))) to (Last created leaderboard) with label (Name of (Player((Integer A)))) and value PlayerScore[(Player number of (Player((Integer A))))]
To update the leaderboard, do this trigger:
Event-Unit - A unit Dies
Condtion-((Owner of (Killing unit)) controller) Equal to User
Actions-Set PlayerScore[(Player number of (Owner of (Killing unit)))] = (PlayerScore[(Player number of (Owner of (Killing unit)))] + 1)
Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to PlayerScore[(Player number of (Owner of (Killing unit)))]
07-24-2004, 03:36 AM#3
NueRoN-X
alright thanks a lot raf .. i gotta see if i understand that all when i get to my other computer with my WE =) .. casue like i said earlier i am a noob triggerer.

also i have one more problem... nothin with triggers i dont think but i dont want to make a new thread .. alright so problem number 3 ..

problem 3: i created a special boss character and i want him at high level .. and i thoguht that you could change the level in the object editor .. so i set him at lvl 50 ? (i think) then saved it .. but when i tested the map , he spawned at level 1 .. i have NO idea as to what the problem is .. so as always .. any help is appreciated =)
07-24-2004, 03:31 PM#4
Magnum
Is he preset on the map? if so click on him and you can set it that way. Also make sure that you have set the max hero lvl to what lvl you want....
07-24-2004, 03:43 PM#5
evilprogrammer
Quote:
Originally Posted by Magnum
Is he preset on the map? if so click on him and you can set it that way. Also make sure that you have set the max hero lvl to what lvl you want....

be sure to set max unit level too.. :D
07-24-2004, 04:47 PM#6
Shimrra
Max Hero level is under the Advanced > Gameplay Constants > Hero Max Level, if you're looking for it.
07-24-2004, 06:24 PM#7
Anitarf
The level that you probably changed in the object editor was just the normal level, used with units to determine how much experience they give.
07-24-2004, 07:14 PM#8
NueRoN-X
alright thanks for the replies but:

1. it's a 100 lvl hero arena im making and i have set the gameplay constants accordingly.

2. the boss is not preset on the map .. i've used triggering to create him because he is only supposed to be created when a unit enters a certain area.

@anitarf- if so , then where do i change the hero level at?

alright thats about it .. thanks for replies you guys are tons a help =)
07-24-2004, 08:50 PM#9
Rafael Br
To set it's level, when you create the hero, use hero-set level action, if you have set the gameplay constansts right, it should work.
07-24-2004, 08:56 PM#10
NueRoN-X
Quote:
Originally Posted by Rafael Br
To set it's level, when you create the hero, use hero-set level action, if you have set the gameplay constansts right, it should work.

thanks again .. but im having problems with your earlier triggers .. i did the timer perfectly i think (pretty sure i did) .. and in the leaderboard im confused as soon as you hit the "loop - actions part" .. can yah help me out again?
07-24-2004, 09:13 PM#11
Rafael Br
Alright, lets explain a little more:
Loop - Actions
Leaderboard - Add (Player((Integer A)))-This functions is "Conversion-convert player index to player", shold appear "player(1)", clic on the 1 and select "for loop integer A" to (Last created leaderboard) with label (Name of (Player((Integer A))))"the same as before, just use the name of player function and then the conversion one. and value PlayerScore[(Player number of (Player((Integer A))))], this is an array variable, to make one, on the variable editor, mark the field "array" and then put the size (should be the max number players of the leaderboard), to set this variable, use the normal set variable action , under the index part, select the function player number, then use the conversion one to find the player as it bein said before.
To update the leaderboard, do this trigger:
Event-Unit - A unit Dies
Condtion-((Owner of (Killing unit)) controller) Equal to User-Just use "player controller comparison"
Actions-Set PlayerScore[(Player number of (Owner of (Killing unit)))] = (PlayerScore[(Player number of (Owner of (Killing unit)))] + 1)The same player number function, but put "owner of unit" instead of the conversion, after the = i used also a "Arithimetic" function.
Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to PlayerScore[(Player number of (Owner of (Killing unit)))]
I hope it's clear now, I could do a demo map, but it is better for you to learn a little, it will be usefull.
07-25-2004, 02:13 AM#12
NueRoN-X
alright i think i got it .. though on the right column, i want the kills and it has the player numbers .. also , for the value on the leaderboard trigger in the action below the "loop - actions" thing, i dont know how to put the array variable there .. if you could explain it that would be tons of help ..

and the timer doesnt work even though i put the triggers in just as you said (at least i think i did) .. heres what i did :

Events - Map Initialization
Actions -
Countdown Timer - Start a Countdown Timer with the Title Gold Income In:
Countdown Timer - Show timerwindow (thats my variable's name)
Countdown Timer - Start timer as a One-shot timer that will expire in 30.00 seconds ^^^ variable name

then, in a seperate trigger, i made this:

Events - Timer - timer expires (variable name is timer if you haven't already guessed)
Actions-
Player - Add 1000 to Player 1 (Red) Current gold
(then all the other players, blue through brown)

Also, I think you should know that after I choose my character (after the map starts), I am awarded 2000 gold for the first time .. I have no idea what's going on .. I'm really confused .. HELP!!
07-25-2004, 03:05 AM#13
Rafael Br
For the timmer, timmers and windowns can't be displayed on map innitialization, use time elapsed-0.10 seconds instead.To put the variable there, just use the action as I said, then on the field to change the number of the new value, cllick on it, then instead of putting the number, select the variable.If it is not this that you want, be more specific.
07-25-2004, 03:50 AM#14
NueRoN-X
alright thanks .. i got the timer working ..
the scoreboard thing is still a little messed up though .. this is it..

Scoreboard

World Edit 1
User 2 2
User 3 3
User 4 4
User 5 5
User 6 6
User 7 7
User 8 8
User 9 9
User 10 10
User 11 11
User 12 12
07-25-2004, 07:01 AM#15
Anitarf
Sorry, I haven't gone deep enough into rafael's trigger to know what's wrong, but I just had to post this, it's funny:
Quote:
PlayerScore[(Player number of (Player((Integer A))))]
Couldn't you just use PlayerScore[(Integer A)]? :)