(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > World Editor Help Zone

World Editor Help Zone Need help with Blizzard's World Editor? Ask general questions about its features and use in this forum. README!

Reply
 
LinkBack Thread Tools Display Modes
Old 11-20-2008, 01:58 AM   #1 (permalink)
 
Aschy's Avatar

User
 
Join Date: Jan 2008
Posts: 133

Aschy has little to show at this moment (13)Aschy has little to show at this moment (13)


Threat Calc

Well in one of my projects I have been designing a threat calculator. It desides who is the greatest threat by adding up time in battle and spell damage/healing done. This is being made in GUI.

Alright I have a couple questions but I will start off with the easiest first. If I wanted to make a trigger find the largest value of say about 8-12 values how would I do that? 2 is it possible to have a damage calculator made in GUI or is it only possible in JASS? 3 right now the person with the highest threat would probably run around agroing creeps that are not in combat (This would only happen if the hero was attacking things to put itself in combat). I want it so that the creep knows if it; itself is in combat. If I wanted to do such a thing would each creep need its own varible? And would future creeps that would spawn need there own varibles also??


Thanks in Advance
Aschy is offline   Reply With Quote
Old 11-20-2008, 05:55 AM   #2 (permalink)
 
Day-Elven's Avatar

User
 
Join Date: Apr 2008
Posts: 348

Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)Day-Elven has little to show at this moment (39)


You need to write the value of damage to the global variable with array (player number of players). Read about damaging system. You can check who did more damage with "Math - Max". It's possible to make it on GUI.
You don't need variable for each creep.
Day-Elven is online now   Reply With Quote
Old 11-20-2008, 10:37 PM   #3 (permalink)
 
Aschy's Avatar

User
 
Join Date: Jan 2008
Posts: 133

Aschy has little to show at this moment (13)Aschy has little to show at this moment (13)


Ahh thank you Day-Elven.


now can anyone answer:

Quote:
right now the person with the highest threat would probably run around agroing creeps that are not in combat* (This would only happen if the hero was attacking things to put itself in combat*). I want it so that the creep knows if it; itself is in combat. If I wanted to do such a thing would each creep need its own varible? And would future creeps that would spawn need there own varibles also??*



*not in combat (not attacking things, or healing. At guard position)
*combat (attacking things, or healing)
*I have a boolean varible for each hero so that they know whether they are in combat or not.
Aschy is offline   Reply With Quote
Old 11-21-2008, 02:34 AM   #4 (permalink)
 
Zack1996's Avatar

Snowman!
 
Join Date: Dec 2007
Posts: 502

Zack1996 is on a distinguished road (83)Zack1996 is on a distinguished road (83)


You could give each creep an ability called "Combat Status" when they spawn or w/e. Level 1 of that ability means the creep is not in combat, Level 2 means it is in combat. So when the creep acquires a target or casts a spell or whatever, set the level of the skill to 2. When they stop combat, set it to 1.
So when you want to check if they are in Combat or not, check which level of ability they have using If, Then, Else.
That would probably be the best solution :)
__________________
Ask me for help with Minor Model Edits or Trigger Help.
Check out my spells: Water Spell Pack--> Water Spell Pack(+reps for comments)
+reps can make a person really happy! +rep those who helped you!
Zack1996 is offline   Reply With Quote
Old 11-21-2008, 08:22 PM   #5 (permalink)
 
KYTON's Avatar

User
 
Join Date: Oct 2007
Posts: 138

KYTON has little to show at this moment (8)


Set User Data (custom value in GUI I think) could also work. Apon spawning you set all your unit's user data to 1 and when they enter combat it is set to 2 and on leaving combat to 1. This is a very "simple" way of doing it, but also should work.
__________________
Download C.H.A.O.S and prepare yourself for the ultimate AOS experiance:

CHAOS version 0.4.2

Sorry, but I'm currently on vacation. I'll be back on the 10th.
KYTON is offline   Reply With Quote
Old 11-21-2008, 09:43 PM   #6 (permalink)
 
DarkAngelAzazel's Avatar

Envoy of the Apocalypse
 
Join Date: Sep 2008
Posts: 412

DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)DarkAngelAzazel has little to show at this moment (36)


To get the biggest value of ~10 you just need to stack the max function.

You do it like this:

max(max(max(max(1,2),max(3,4)),max(max(5,6),max(7,8)),max(9,10)))

I think I made a mistake but you know the idea...
__________________
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe"

Quote from Albert Einstein
DarkAngelAzazel is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Unsolved] threat opening MeEsA World Editor Help Zone 2 09-19-2008 06:49 PM
Is Russia A Possible Threat? Craka_J Off-Topic 405 01-08-2008 09:25 AM
Threat system request terrator Requests 1 04-11-2006 11:12 PM

All times are GMT. The time now is 08:27 AM.






Your link here 
Mortgage Loans | Debt Consolidation | Advertising | Debt Consolidation | Bad Credit Credit Card
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle