HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

I'm making this game and I would really appreciate some help.

12-20-2006, 11:19 PM#1
warbucket
Hello all,

I'm not a very experienced map developer, and some things are still dragging me down.

I have this map I'm making called BabySheepBlues. The objective of the game is to click on your opponents unit; each click will reduce ones opponents HP by 10. Clicking them 11 times will kill them. There will be multiple play modes, such as the first to 20 kills wins, etc., etc... The sheep will have different abilities to conceal themselves, escape, hide, etc, on very small arena. It's a frenzy type game. Anyway, this isn't a recruitment forum, so here's my problem:

My question is how can I make it so that when you click an enemy unit its HP will go down by 10, making sure that clicking your own unit will not damage it.

My predicament involves not being able to do this appropriately. I tried making it a General Unit Event, but I couldn't get the option "If selected"; this option is available on a specific unit event but that means I can't apply this rule-set to each of the users' units or enemies.

I would really appreciate some help on this. It would great!
12-20-2006, 11:36 PM#2
TopWolf
Use event: Player: Player selects unit
Then condition:Player: Triggering player not equal to owner of selected unit
Then Event: Set life of unit = lif of unit - 10

If you have some expierience with the GUI, you probably just overlooked the event.
12-20-2006, 11:37 PM#3
Av3n
... Prehaps when player selects an unit event will help then with an condition thats checks if it is an enemy unit

-Av3n
12-20-2006, 11:47 PM#4
warbucket
Thanks TopWolf, Av3n. It looks like I didn't even both to think of the Player functions.

TopWolf, can I use Owner of Picked Unit, because I can't seem to find Selected Unit on the Player Comparison function.
12-21-2006, 12:02 AM#5
warbucket
Everything works until the Player Comparison. I can't find Selected Unit. Picked Unit doesn't work either.
12-21-2006, 12:06 AM#6
wyrmlord
Use Triggering Unit, it says so in the unit is selected event.
12-21-2006, 12:06 AM#7
Exilus
Quote:
Originally Posted by warbucket
Everything works until the Player Comparison. I can't find Selected Unit. Picked Unit doesn't work either.

in such context, try triggering unit.
Triggering player= Player selecting the unit
Triggering unit= Unit being Selected


btw, picked only work for when you make unit groups (pick every units in units group and then do action...)THEN, you use picked unit to refer to every units picked in the group.



Rep plz =)
12-21-2006, 12:15 AM#8
warbucket
Thanks guys. It works now, and I added rep.
12-21-2006, 12:22 AM#9
warbucket
Ok. I have another problem if anyone is willing to look it over: Although, this does relate to my game I'm making, and is probably a result of adding this clicking function.

I'm following the tutorial posted here:

and, under the Tally Scores, the second Action, doesn't seem to work for me. It's exactly the same but I'm wondering if clicking a player to death based counts as a kill?
12-21-2006, 12:28 AM#10
wyrmlord
Quote:
Originally Posted by warbucket
I'm following the tutorial posted here:
What is the tutorial? I don't see a link to a tutorial (if I'm supposed to) or have an idea on where it is. Perhaps it would even be better for you just to post the trigger here.
12-21-2006, 12:35 AM#11
Pyrogasm
If you're trying to give players credit for kills, just make an invisible dummy unit for each player and assign it to a variable with array size 12, and replace the "Unit - set life of unit to..." action with this:
Trigger:
Unit - Cause Dummy_Variable[Player Number of (Triggering Player)] to damage (Triggering unit) for 10.00 damage of attack type normal and damage type normal
12-21-2006, 02:39 AM#12
Exilus
Quote:
Originally Posted by warbucket
Ok. I have another problem if anyone is willing to look it over: Although, this does relate to my game I'm making, and is probably a result of adding this clicking function.

I'm following the tutorial posted here:

and, under the Tally Scores, the second Action, doesn't seem to work for me. It's exactly the same but I'm wondering if clicking a player to death based counts as a kill?

you could replace this function to your trigger.

Instead of setting life to life of triggering unit-10, you could create a dummy unit for each players in the game,associate it to a variable array(based on player number), and you could make it

Event: Unit is selected
Cond: Triggering unit is owned by (an ennemy of triggering player)
Action:Make (Dummy unit variable[Player number of triggering player]) Damage triggering unit, causing 10 damage of type normal.


this way, if the unit dies, the kill is considered yours, as instead of just removing the life, the damage source will be from a unit owned by the clicking player.

from now, you can make triggers wich give credit to the clicking player,

i dont know if that's what you wanted....
12-21-2006, 02:52 AM#13
Pyrogasm
Quote:
Originally Posted by Exilus
you could replace this function to your trigger.

Instead of setting life to life of triggering unit-10, you could create a dummy unit for each players in the game,associate it to a variable array(based on player number), and you could make it

Event: Unit is selected
Cond: Triggering unit is owned by (an ennemy of triggering player)
Action:Make (Dummy unit variable[Player number of triggering player]) Damage triggering unit, causing 10 damage of type normal.


this way, if the unit dies, the kill is considered yours, as instead of just removing the life, the damage source will be from a unit owned by the clicking player.

from now, you can make triggers wich give credit to the clicking player,

i dont know if that's what you wanted....
Just sayin'. Nice job looking at the post above yours, Exilus. That's exactly what I said 2 hours ago .
12-21-2006, 02:54 AM#14
wyrmlord
You could go with their method or check the unit's life when it's clicked on and if it's 10 then just do whatever actions you had planned. Either way should work fine.
12-21-2006, 03:57 AM#15
warbucket
This is the tutorial: http://www.wc3campaigns.net/showthread.php?t=84828

I just copied the TriggerTallyScore exactly as it is, as well as the LeaderBoard. It doesn't work as simply as the tutorial explains, because adding a click->death function doesn't seem to actually credit the killer with a kill.

This is what I have for the click function. How should I change this to accommodate the leader board?

Event:
Player - Player 1 (Red) Selects a unit

Condition:
(Triggering player) Not equal to (Owner of (Attacked unit))

Action:
Unit - Cause (Triggering unit) to damage (Attacked unit), dealing 10.00 damage of attack type Spells and damage type Normal

If I were to go the Dummy route, how would I assign variables to distinguish the dummies for each player?