• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to create starting structures

Status
Not open for further replies.
Level 1
Joined
Mar 28, 2013
Messages
5
Does anyone know how i can have unit structures (depending on de race you choose) for every player at the beginning of a new game, which are already there when you start.

If thats possible i want to be able to upgrade the unit structures during the game to spawn more units. 1 upgrade is 1 extra unit every few seconds. (instead of extra buildings like desert strike)

I hoop this is even possible but i realy have some nice ideas with it

At last i hope there is someone how could tell me how i can let the automaticly increasing income increase faster for every player in a team (10% for example), just by building a refinery on a vespine geyser somewere on the map

thanks,

laurens
 
Level 9
Joined
Dec 21, 2006
Messages
490
you have to do that with triggers.

catch the map start EVENT - Map Initialization

for each integer from 1- number of players

if then else if

if race of player[selected int] == terran
then create 1 barracs at point with offset (starting point of player)

if race of player ....


for the other thing, i don't know how you have organiced your income trigger. here is how i would do it

create a global var : income[number of players]
then create a trigger with periodic event:

every 20 secongs of real time

for each integer from 1 to number of players
add income[selected integer] to player selected integer


then create a trigger that catches the build event
any player is using ability build raffinery

income[triggering player] = income[triggering player] + 10
 
Level 1
Joined
Mar 28, 2013
Messages
5
Thanks for the answer

to be honest i am still very new to the triggering so i get that the things you name are events and that i have to make them for each player, but ik dont really understand what to do with it.

If you could explane it step by step than that would be great.

Im afraid its the only way i could understand it.
 
Level 9
Joined
Dec 21, 2006
Messages
490
ok i will help but you have to do something too :d
post w/e you already did and i will correct it if needed.

Event - This starts the trigger
Condition - and if this is true
Action - these actions will be run

Let's start with income

create a new global variable called income. then add one dimension with the number of human players your map will have. should look like income[10] for example.

then create a new trigger. call it incomeTrigger
Event - Every 20 seconds of real time
Condition -
Actions -
general - for each integer from 1 to 10 (the number of players)
- Change player property --> Add income[selected integer] minerals to player selected integer
 
Level 1
Joined
Mar 28, 2013
Messages
5
This if what i tried before:

Trigger: Ref build

event: any unit uses ability - build refinery - finish state (have this for every race)

action: Run Trigger: extra minerals

Trigger: extra minerals

event: timer every 5 sec

action: turn current trigger off (says it can be turn on by differet trigger like ik have)
action: change property player 1: add 100 min (just to test)

what happens is that i get an extra 100 minerals after i build a ref, but only at that moment and not every 5 sec like i ordered in the event

Right now im trying to do it by including the things i can understand that you explaned, but i dont get why the method of above doesn't work
 
Status
Not open for further replies.
Top