Making new units be built by a Comp controlled barracks.

Do you need World Editor help? Ask here!
Forum rules
Before making a new topic:
First, check if your question has already been answered in the Tutorials section.
If you didn't find a solution, use the search function.
If searching didn't help either, you can make a new topic.

Topic title & content:
You must use a descriptive title. (Help plz is not good) (Need help with Dialog buttons is good)
Go into much detail when posting. You should post attachments. Like screenshots of the problem, the map you are making, replays of the error. Or you could even make a screencast (video) of your problem and upload it here.

Spelling:
Grammar seems to be a serious problem amongst teenagers, so use a spell checker or you will get no love.
Read your posts twice, before pressing the reply button.
And do not use profanity. Chatspeak (y r u nub) and Leetspeak (1 C4N S33 H4X) are not welcome here either.

Only World Editor related questions are allowed here!
(Click for Battle.net help) (Click for World Editor help)
Darktiger138
Posts: 113
Joined: Fri Apr 13, 2012 2:48 pm
Realm: US East
Account: Darktiger138
Clan: THP
Location: New Zealand

Making new units be built by a Comp controlled barracks.

Unread post by Darktiger138 »

I made some quest variables to initialize unit production, but they wont work.

I enable the variable here:

t_tri Nob Spawn
t_jm t_eve Events
t_lin t_jb t_tim Time - Elapsed game time is 10.00 seconds
t_j t_co Conditions
t_jbm t_act Actions
t_emp t_j t_lea Quest-Disable Level1Units
t_emp t_jb t_lea Quest-Enable Level2Units


Then use it here:

t_tri SpawningDG2
t_jm t_eve Events
t_emp t_jb t_tim Time-Every 5.00 seconds of game time
t_jm t_co Conditions
t_lin t_jb t_if (Level2Units is enabled) equal to True
t_jbm t_act Actions
t_emp t_jb t_ugr Unit Group-Order(Units owned by Player 11(Dark Green) of type Ork Houz to train a Nob

but it doesnt work, the unit doesnt get produced.
Attachments
Warhammer 40k map.w3x
The problematic map
(199.82 KiB) Downloaded 686 times
Last edited by Darktiger138 on Fri Apr 13, 2012 7:32 pm, edited 1 time in total.
Spoiler:
Spoiler 1
Spoiler:
Spoiler 2
Spoiler:
Spoiler 3
Spoiler:
Spoiler 4
Spoiler:
Spoiler 5

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Making new units be built by a Comp controlled barracks.

Unread post by 3ICE »

There is no event on the second trigger, so it never fires.
A periodic time event would suffice.
ImageImageImageImageImage
Image
ImageImage

Darktiger138
Posts: 113
Joined: Fri Apr 13, 2012 2:48 pm
Realm: US East
Account: Darktiger138
Clan: THP
Location: New Zealand

Re: Making new units be built by a Comp controlled barracks.

Unread post by Darktiger138 »

Oops, I missed the event

t_eve Events
t_emp t_jb t_tim Time-Every 5.00 seconds of game time

thats what I have for the second one
Spoiler:
Spoiler 1
Spoiler:
Spoiler 2
Spoiler:
Spoiler 3
Spoiler:
Spoiler 4
Spoiler:
Spoiler 5

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Making new units be built by a Comp controlled barracks.

Unread post by 3ICE »

In that case, check to make sure the player has enough resources to train the unit. Also make sure the unit can be trained (no tech requirements, listed on the building, training time close to 0, gold/wood/supply cost 0)

Debugging step: Change everything (units, triggers, resources) around, so you are the dark green player. Does anything happen?
ImageImageImageImageImage
Image
ImageImage

Darktiger138
Posts: 113
Joined: Fri Apr 13, 2012 2:48 pm
Realm: US East
Account: Darktiger138
Clan: THP
Location: New Zealand

Re: Making new units be built by a Comp controlled barracks.

Unread post by Darktiger138 »

I have the cost of the unit at 0 gold 0 lumber 0 food, so thats not the problem.
Spoiler:
Spoiler 1
Spoiler:
Spoiler 2
Spoiler:
Spoiler 3
Spoiler:
Spoiler 4
Spoiler:
Spoiler 5

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Making new units be built by a Comp controlled barracks.

Unread post by 3ICE »

At this point sharing the map would be the quickest way to a solution.
ImageImageImageImageImage
Image
ImageImage

Darktiger138
Posts: 113
Joined: Fri Apr 13, 2012 2:48 pm
Realm: US East
Account: Darktiger138
Clan: THP
Location: New Zealand

Re: Making new units be built by a Comp controlled barracks.

Unread post by Darktiger138 »

Its no where near finished and its a bit of a mess, but sure.

I attached it to my first post.
Last edited by 3ICE on Fri Apr 13, 2012 7:35 pm, edited 1 time in total.
Reason: merged doublepost
Spoiler:
Spoiler 1
Spoiler:
Spoiler 2
Spoiler:
Spoiler 3
Spoiler:
Spoiler 4
Spoiler:
Spoiler 5

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Making new units be built by a Comp controlled barracks.

Unread post by 3ICE »

As mentioned above:
3ICE wrote:...make sure the unit can be trained (..., listed on the building,...)
Attachments
List the unit as trainable.png
List the unit as trainable.png (50.69 KiB) Viewed 15662 times
ImageImageImageImageImage
Image
ImageImage

Darktiger138
Posts: 113
Joined: Fri Apr 13, 2012 2:48 pm
Realm: US East
Account: Darktiger138
Clan: THP
Location: New Zealand

Re: Making new units be built by a Comp controlled barracks.

Unread post by Darktiger138 »

I thought that was the problem, but the Shoota Boi units dont get trained either, under the same circumstances.
Spoiler:
Spoiler 1
Spoiler:
Spoiler 2
Spoiler:
Spoiler 3
Spoiler:
Spoiler 4
Spoiler:
Spoiler 5

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Making new units be built by a Comp controlled barracks.

Unread post by 3ICE »

The SpawningDG1 trigger never fires. If I delete the condition, it works.

It is because you are using quests instead of boolean variables for storing a true/false value.
Quests need to be initialized before they can be enabled:
This is how to do it This is how to do it
t_lea Quest - Create a Required quest titled t with the description d, using icon path i t_set Set Level1Units = (Last created quest) t_lea Quest - Enable Level1Units
ImageImageImageImageImage
Image
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests