• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help PLease

Status
Not open for further replies.
Level 4
Joined
Jan 9, 2006
Messages
54
I require help for a future game called Imperial Assault. It is a Star wars themed map that takes place on an unknown planet (The one from kotor below Star forge). the Empire Rebels CIS and republic have crashed onto the planet and battle each other for domiinace over the planet. Each race builds a base and if the main building reaches 30% hp it is then allied to the attacking player, changes color and is still controlable by the player that was attacked. first to conqeuor all wins!

Heres wat i need help in:

I am trying to make it so that for each piece of lumber you get 1 gold every 15secs from a timer.
i would like to know how to make a timer and how to set it to get 1 gold for each piece of lumber every 15sec

I also would like to know how to make it so if a town hall reaches 30% hp the players's attacked town hall and all other buildings is then allied and changes to the same color as the attacking player but still has control over the players units although conqueored by an enemy player.

Lastly i would like to know how to change ur name while in game. Example: -name Hi and then the player's name changes to "Hi"

(This game is bascially like Empires)
 
Level 24
Joined
Jun 26, 2006
Messages
3,406
>_> some of these are simple if you try hard enough.

for the gold/lumber thing just take set a variable for each player, every fifteen seconds set that variable to the amount of wood each player has and add the amount of the variable said player's gold. just have a timer to go along with it.

Untitled Trigger 001
Events
Time - Every 15.00 seconds of game time
Conditions
Actions
Set intwood1 = (Player 1 (Red) Current lumber)
Player - Add intwood1 to Player 1 (Red) Current gold
Set intwood2 = (Player 2 (Blue) Current lumber)
Player - Add intwood2 to Player 2 (Blue) Current gold


for the town hall thing you can have it set up so that if the building reaches 30% hp then you can A) heal it and B) change it's owner.

Untitled Trigger 001
Events
Unit - No unit's life becomes Less than 30.00
Conditions
(Owner of (Attacking unit)) Equal to Player 1 (Red)
(Unit-type of (Triggering unit)) Equal to [Your unit]
Actions
Unit - Change ownership of (Triggering unit) to Player 1 (Red) and Change color

you will need to change this for every player and MAY need to tweak it a little.

as for changeing player name use

Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing -name as A substring
Conditions
Actions
Player - Set name of Player 1 (Red) to (Entered chat string)

this may or may not include the -name part.

i didn't put much effort into this to prove that if you want something done right and have the time you try it yourself first.
 
Level 4
Joined
Jan 9, 2006
Messages
54
The event: no unit takes 30.00 dmg does not work. so this is wat i did:

PlayerConqueroring
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 1 (Red)
(Unit-type of (Attacked unit)) Equal to Imperial Stronghold
(Unit-type of (Attacked unit)) Equal to Rebellious Hidden Headquarters
(Unit-type of (Attacked unit)) Equal to Confederacy of Indenpendent Systems Headquarters
(Unit-type of (Attacked unit)) Equal to Republic Base of Operations
Actions
Unit - Order (Attacking unit) to Stop
Unit - Set life of (Attacked unit) to 100.00%
Player - Make (Owner of (Attacking unit)) treat (Owner of (Attacked unit)) as an Ally with shared vision
Player - Make (Owner of (Attacked unit)) treat (Owner of (Attacking unit)) as an Ally with shared vision
Player - Change color of (Owner of (Attacked unit)) to (Color of (Owner of (Attacking unit))), Changing color of existing units

This works but when attacked, it takes a couple hits and the trigger takes place. i want to make it so the building has 30% life before allying to the attacking player.
The name trigger works but it has the -name included into the entered chat. i was wondering how to remove the -name part.
 
Status
Not open for further replies.
Top