HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Events in WC3

01-29-2003, 02:37 AM#1
Guest
Hi all,

I was just wondering if there is a way to create your own events in WC3 to set off triggers. Here is what I'm doing:

I'm making a map that starts out with each player having his very own infinite mine in an area that can't be attacked by the opposing team, the point of the game is to mine a certain amount of gold (or platinum as I'm calling it) from one of two mines located in the middle of the map. The "platinum" harvested from these mines will not count towards the players usable gold, it will only be added to a variable, and when that variable gets over a certain limit, that player wins. I won't allow any towers or seige weapons in the game to make it interesting.

The custom event that i want to make is one that detects when gold has been taken from a certain mine, this will allow me to subtract it from the players total and also allow me to know when to increment the "platinum" variable.

Any help will be much appreciated, I'm sure this isn't the only way to do what I'm trying to do, but it's the only thing I can think of. I'm not adverse to using JASS or anything to do it either, whatever makes it work, thanks again.

~Cyplex
01-29-2003, 07:08 AM#2
Guest
I would tell you but i this is out of my league, so i don't know. Weaaddar will help you or DKSlayer or someone.

And why isn't this in the Map Development forum? i don't intend to be mean but, please place these type of questions in the correct forum.

~AfterShock
01-29-2003, 03:24 PM#3
DKSlayer
Hmmm, dang I am trying to think if there is such an event in JASS either. It might take some tricky work to get it to correctly pick which gold was gotten from the platinum mine.
I will move this over to the Map Development Forum. Maybe someone can help you there. When I get home from work, if it has not been figured out I will try and think of a way to do this.
DKSlayer
01-29-2003, 10:55 PM#4
Guest
Hi again,

I decided to take a slightly different route for what I said above. I decided to add two more teams to the mix, and a second force. I have players 1 and 3 on force 1 and players 2 and 4 on force 2. I have shared vision and advanced shared unit control on each force.

Then I put a region around each "platinum mine" and made a trigger that rescues a given teams peons that enter that region to the other team on the force, this is so gold mined from the platinum mines will not count towards YOUR actual gold. Then i made a trigger that keeps track of when either player 3 or 4's gold gets above a certain mark, player 1 or 2 will win then.

The only problem is that I have another trigger that is trying to update a leaderboard with the amount of platinum that each team has. I want to make it update whenever team 3 or 4's gold increases, but the trigger won't let me use the real variable i made to hold the old values of the gold to compare against. It says that there are no variables of that type (real) created and it doesn't have a button to edit variables either, the thing is, i made a real variable to use for this trigger, and it just won't recognize it. This is very perturbing because it's the only way i can see to update the leaderboard.

If anyone has any ideas I would appreciate it. I don't know if there is any way to put variables in a different scope or anything, but I made the variables in the variable editor and the trigger is not in JASS, it's just the trigger editor shit, so there shouldn't be a problem with scope anyway.

Again, any help would be appreciated, thanks in advance
~Cyplex
01-29-2003, 11:03 PM#5
Aiursrage2k
Okay for the platinum mine, here is what I am thinking, somehow there peon (or equvilent) can build a special building on the gold-mine he is sent to mine the gold, then if one of the five spots **dynamically generated, he is moved to a spot. Then every few seconds *calculate the amount a give gold. This is basically the Undead method... I will try to do this if need be.
01-30-2003, 12:16 AM#6
SCVirus
why make it a gold mine all your doing is a very basic king of the hill with 1 hard *** trigger. a beacon that is controled when a unit is on it and every 3 seconds or so the player gets 1 lumber(platinum), would be much easier. its also a very pointless idea. king of the hill maps are not popular, or fun or inovative.
the triggers would be intresting if you got it work, but you need more then 1 trigger to make a map.

for example, if you put a couple custom skins in the map (maybe characters from king of the hill) it might be fun. Or if you made a fun race or something i dont know unless you got something else to this map i would never play it.

with no towers or seige then it will turn from a tactical game to a pointless laggy 90 supply bloody pointless endless ground war.

this is not flaming just my opinion
01-30-2003, 12:24 AM#7
Thunder-Hunter
I think the map sounds Kinda cool
01-30-2003, 02:33 AM#8
rwxr-xr-x
Quote:
Originally posted by cyplex


The only problem is that I have another trigger that is trying to update a leaderboard with the amount of platinum that each team has. I want to make it update whenever team 3 or 4's gold increases, but the trigger won't let me use the real variable i made to hold the old values of the gold to compare against. It says that there are no variables of that type (real) created and it doesn't have a button to edit variables either, the thing is, i made a real variable to use for this trigger, and it just won't recognize it. This is very perturbing because it's the only way i can see to update the leaderboard.


That is because the LeaderBoard is expecting it's values as an integer. You need to use the action
Conversion - Real to Integer
01-30-2003, 03:54 AM#9
DoctorDoom
Actually I believe the leader board recognizes real just fine. In fact I think real variables are its main branch with "conversion-interger to real" so I'm not shure whats happening with your trigger. Are you shure the variable is of type 'real' and if it is and it's not working make it of type interger and then use the conversion.
01-30-2003, 04:23 AM#10
Guest
If the LeaderBoard uses Real, do: Set Value of [Neutral Hostile] on leaderboard [Last Created LeaderBoard] to [Player Property: [[Gold] of [Player #]]]

If the LeaderBoard uses Interger, do: Set Value of [Neutral Hostile] on leaderboard [Last Created LeaderBoard] to [Conversion Real to Interger [Player Property: [[Gold] of [Player #]]]]

There u go. Modify the Players so that Neutral Passive is for team 2. Add both players to the leadboard, and voila!