[en] - Modding Corner > Coding

Coding in Edain 4.00

<< < (15/23) > >>

calsash:

--- Zitat von: Gnomi am 27. Feb 2016, 14:08 ---To capture a flag, there need to be a building right beside it which can be captured. If there is no capturable building the flag can't be captured. (either you make a building capturable or you just place an inn, scale it to 0.01 and z=-1 (or something else so you don't see it) and make it not selectable.

--- Ende Zitat ---
Are these scripts correct
SCRIPT 1
IF
Unit 'White Council' (name of flag) is owned by player_1 *AND* true.
THEN
Null operation(does nothing)
Set timer 'Troupsarrive' to expire in 100 frames.

SCRIPT 2
IF
Timer 'Troupsarrive' has expired.
*AND* True.
THEN
Null operation(does nothing)
Spawn an instance of Team 'Player0001/teamplayer0001' at waypoint 'Council spawn'

Those are what i have and it didnt seem to work when I capped the flag, sorry for all this bother.

Gnomi:
What exactly doesn't work?
Do troups arrive at the wrong time or not at all? Best thing is to upload the map, then I can look at it directly.

Also I wouldn't use the frame timer, but the second timer (a second has about 5 frames).



I think this could be the problem:
Have you used "Add skirmish players"?
If no, then delete your players and DO IT.
"player_1" is probably not the real Player_1 which starts at start point 1. Additionally Player0001 is also not the Player_1.

DrHouse93:
Just remove the TRUE and NULL OPERATION commands. They're not required to make the script working.

But, as Gnomi said, you must add the correct Skirmish Players. Furthermore, the reinforcement army should belong to Player_1, but also to a different team (to add it, just click on the button with three guys on the top right corner of the Worldbuilder, select Player_1, and then Add new team. Then, in the bottom part of the window, you can select all the units you want to make them spawn with the team (just ignore the Max tab, because the game will consider just the Min one))

If you have any difficulties I can post a screen of it :)

calsash:
Ah thank you and yeah i did add skirmish players i just got confused about whether the reinforcements had to be  a different team or not.

DrHouse93:
If I'm not mistaking, "teamPlayer1" should be Player_1's starting units/buildings, so that's why you should make the reinforcements belong to another team :)

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln