HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Advanced Trigger Issue

08-07-2002, 06:32 AM#1
Guest
Hey All,

I was hoping someone could help me with a problem I'm having on this Hero Arena map I'm making. I've been busting tail on this project for over 5 weeks (of spare time) now and am stuck on 2 killer technical issues.

Visit www.badash.bravepages.com for the readme file/info on my map to give you an idea of the work I've put into the map so far. This is no slapped-together unblanaced Arena map. :)

I'm a noob, so please bear with me if my questions seem simplistic to you. This is a HUGE learning experience/project for me.

My first issue pertains to the leaderboard. I have a team switching feature that allows players to change teams to keep player #'s even. Can the leader board be changed to reflect this team change? From posting on various forums I think this is not possible without resetting the leader board and thus everyone's score. So I just guess I wanna hear it one more time from someone I respect (technically) that it can't be done.

The above issue is mostly cosmetic. The scoring works correctly when a player switches teams, however he will still be listed as being on his old team. Ugly, but functional.

My second problem (the big one, the killer) is with Dueling. I have the standard dueling trigger set up that picks the highest scoring player from each team and sends them to a duel. However, this process picks players via an integer comparison. It assumes 1-6 are team 1 and 7-12 are team 2. Now lets say that Player 1 has the most kills on team 1 but team 2 needs a player, so he switches. Now when the Duel is triggered Player 1 and the highest scoring player from Team 2 (7-12) are now sent to duel even though they are on the same team now!

My idea for a solution was to randomly pick a player from each team for dueling. I have a variable I use to keep track of who is on team 1 and another for team 2. How do I pick a player from that variable randomly, isolate that player's hero? I need the player and hero isolated because the hero unit needs to be altered (health and mana set to 100% etc.) and sent to the dueling arena.

Thoughts? Suggestions? Or a completely different idea/fix solution?

HELP! Please :)

Bad Ash
08-07-2002, 07:32 AM#2
Mr.123
It's not necessary to reset the scores. Since you already have the scores stored in an array, nothing is lost. Remove all players from the leaderboard, then add them back to the leardboard in the order you want. The other solution would be to preface the label of the player on the leaderboard with their team number/name. Something like:

1-Mr.123
1-BadAsh
2-Blah1
2-Blah2

You can then sort by label and it should sort them into the correct position. When the players change teams, just change their label.
Something like: (Strcat (string(teamnum) + '-' + player name(name of picked player))

For your 2nd problem, add all players on the team into a player group. Use 2 player group variables, team1 and team2. Instead of picking from 1-6 and 7-12, pick from team1 and team2. You can still find highest score by going through each player in the player group. When players switch teams, simply remove them from their original group and add them to the new group.
08-07-2002, 08:43 AM#3
Guest
Thanks for the info,

However I need a bit more help. I apologize if I’m being a hassle, but I really am new at this. In my above post I called myself a noob. Let me qualify that statement. By noob I mean this is my first attempt ever at editing a map and this is my first time ever with triggers, variables, etc.

Everything I have accomplished so far on this project I have done with the painstaking trial and error process. I take a guess at how a trigger might work, save, load map, play test, and start over when they result proves my guess wrong. Also of note is the map I’m working on is just a modification of an existing map. It started with me seeing a few things I thought could be better and grew from there. So some of the triggers and such work fine and I never touched or understood them completely. The leader board and dueling set ups are perfect examples of this.
With these 2 problems I am virtually clueless about how to set this stuff up. With the leader board I already have variables set to keep current on who is in what team (team 1 and team 2 are the variables). But I don't really know how to use them properly.

For example: You gave directions to “you can still find the highest score by going through each player in the group”. Sounds good to me. How is this done? LOL

I guess I’m reaching the point of terminal frustration with this project. I’m close to being ready to say “F” it and toss in the towel. I can release the map as it with a few warnings about bugs/glitches so they can be avoided. I bit off a huge project for a beginner and perhaps should have stuck with making a few standard maps before trying a “mod” type map.

So let me change the tone of this post.

I’m looking to recruit someone to just fix these two problems for me. I’d gladly do the work myself but it would be harder for someone to hold my hand through each single step. It would waste less of your (whoever you may be) time to just make 2 fixes.

I’m so close to completing the map. I added team switching (mostly – save for the 2 above persistent issues), crushed a “stuck player bug”, added special effects, edited heroes (added unit abilities and changed button positions requiring editing and importing abilityfunc.txt files), imported custom sounds (and further edited these with a sound editor - cool edit 2000), play tested EVERY single item in the game (to determine if it was too powerful or too lame or defective), play tested each hero and his/her new abilities to ensure a balance of power (I got a L10 Far Seer and L10 Archmage to beat a L10 Blade Master about 50% of the time in a 1v1 fight!), added a team kill prevention set of triggers and variables (this stops an attack on an ally unless he is sleeping via the Dread Lord spell – in which case you get one attack and now your ally is awake and safe from further attacks), added 3 way gates in the safe areas so players have 3 ways back into the arena not just one (to prevent the lame entry point camping), and a dozen other tweaks/fixes/adjustments.

So it’s not like laziness or lack of desire on my part is why I’m asking for someone to make a few fixes for me. I’m just in over my head and need a snorkel to breathe.

HELP! PLEASE!

Bad Ash
08-07-2002, 06:36 PM#4
Guest
[quote]Originally posted by Mr.123
[b]It's not necessary to reset the scores. Since you already have the scores stored in an array, nothing is lost. Remove all players from the leaderboard, then add them back to the leardboard in the order you want. The other solution would be to preface the label of the player on the leaderboard with their team number/name. Something like:

1-Mr.123
1-BadAsh
2-Blah1
2-Blah2

You can then sort by label and it should sort them into the correct position. When the players change teams, just change their label.
Something like: (Strcat (string(teamnum) + '-' + player name(name of picked player))

Ok I've decided to take a crack at this myself (again) :)

The problem I'm having is that when following your setps above I found that you have to assign a value to the players when you re-add them.

For example:

Player Group - Pick every player in Team1 and do (Leaderboard - Add (Picked Player) to (Last created leaderboard) with label (Name of (Picked Player) and Value 0)

The "and value 0" is my problem. This zeroes out everyone's score. To stop this do I change the value (0) to the varriable "kills"? Does this find the player, get his score from the array, and list it here?

Also in choosing the varriable it still requires a math adjustment. You can't add 0 (won't let you) so I need to add at least 1. So now every time the leaderboard is updated every one scores a point. How can this be corrected?

Bad Ash