[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > World Editor Help Zone


World Editor Help Zone Ask general questions about World Editor features and use in this forum. If you need help fixing a trigger, please post it in Triggers & Scripts. Please review the forum rules before posting.

Closed Thread
 
Thread Tools
Old 04-13-2012, 01:03 AM   #1 (permalink)
Registered User Spartipilo
User
 
Join Date: Jul 2011
Posts: 3,140
Spartipilo is just really nice (404)Spartipilo is just really nice (404)Spartipilo is just really nice (404)Spartipilo is just really nice (404)Spartipilo is just really nice (404)
Multiboard data not properly updating

Hi! I made this long trigger to keep track of towers Experience, Kills and Damage dealt. Also for the player with most gold.

The thing is. If a tower has 20 kills, and I destroy/sell/update it, the Multiboard data doesn't update untill some other tower kills another unit. Same happens with gold, and damage, and exp.

Multiboard Display
Events
Time - Every 0.50 seconds of game time
Conditions
Actions
Set MostExp = 0
Set MostKills = 0
Set MostGold = 0
Set ivar2 = 0
Set MostDamage = 0.00
Set rvar = 0.00
Set rvar2 = 0.00
Unit Group - Pick every unit in Towers and do (Actions)
Loop - Actions
Set TUnit = (Picked unit)
Set Player = (Owner of TUnit)
Custom script: set udg_ivar = GetHandleId(udg_TUnit)
-------- Experience 1 --------
Set ivar2 = (Load 3 of ivar from Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ivar2 Greater than MostExp
Then - Actions
Set MostExp = ivar2
Multiboard - Set the text for MultiBoard item in column 1, row 2 to (PlayerColors[(Player number of Player)] + ((Name of TUnit) + |r))
Multiboard - Set the text for MultiBoard item in column 2, row 2 to (String(MostExp))
Else - Actions
-------- Kills 2 --------
Set ivar2 = (Load 0 of ivar from Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ivar2 Greater than MostKills
Then - Actions
Set MostKills = ivar2
Multiboard - Set the text for MultiBoard item in column 1, row 4 to (PlayerColors[(Player number of Player)] + ((Name of TUnit) + |r))
Multiboard - Set the text for MultiBoard item in column 2, row 4 to (String(MostKills))
Else - Actions
-------- Damage 3 --------
Set rvar = (Load 1 of ivar from Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
rvar Greater than MostDamage
Then - Actions
Set MostDamage = rvar
Multiboard - Set the text for MultiBoard item in column 1, row 6 to (PlayerColors[(Player number of Player)] + ((Name of TUnit) + |r))
Multiboard - Set the text for MultiBoard item in column 2, row 6 to (String((Integer(MostDamage))))
Else - Actions
-------- Gold 4 --------
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Set Player = (Picked player)
Set ivar = (Player Current gold)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ivar Greater than MostGold
Then - Actions
Set MostGold = ivar
Multiboard - Set the text for MultiBoard item in column 1, row 8 to (PlayerColors[(Player number of Player)] + ((Name of Player) + |r))
Multiboard - Set the text for MultiBoard item in column 2, row 8 to (String(MostGold))
Else - Actions
Spartipilo is offline  
Old 04-13-2012, 06:13 AM   #2 (permalink)
Forum Moderator Maker
I...make things
 
Maker's Avatar
Resource Moderator
 
Join Date: Mar 2006
Posts: 8,960
Maker has been here far too long (2904)Maker has been here far too long (2904)Maker has been here far too long (2904)Maker has been here far too long (2904)Maker has been here far too long (2904)Maker has been here far too long (2904)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
How does selling/updating/destroying towers work? Is the old one killed/replaced/removed? Are towers removed from Towers?
Maker is offline  
Old 04-13-2012, 01:25 PM   #3 (permalink)
Registered User Spartipilo
User
 
Join Date: Jul 2011
Posts: 3,140
Spartipilo is just really nice (404)Spartipilo is just really nice (404)Spartipilo is just really nice (404)Spartipilo is just really nice (404)Spartipilo is just really nice (404)
So wise maker... hehehe... I don't know why, I thought they were removed automatically or something.

Tower Update saves the data from old tower to new one.
The old one is replaced
Towers weren't being removed from "Towers" <- Here was the problem

¬°Thanks again!
Spartipilo is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 06:38 AM.




Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle