VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
Oh god I hate coordinates and degrees...
But I guess that's what I have to do, thanks.
Rank up!
i^love^mixery
14 years ago
you dont have to use coordinates. waypoints work too. you just have to directly spawn them for SkirmishGLA.
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
Yeah but then they wont spawn in the direction that I want... :/
Rank up!
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
@i^love^mixery,
I can open your map and all my other maps but I can't open the one I'm working on.
When I try to open it WB starts loading and it never stops. If I try to click on WB under the load it crashes and says:
"WorldBuilder has stopped working."
The options I can click are "Shut down" and "Wait for response", nothing happens which ever one I click.
Can you see if it works in your WB? Thanks.

  Birds nest.rar (123kb) downloaded 13 time(s).
Rank up!
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
Found the error, I forgot a " at the end of a brief in the map.str file in the map folder.
Rank up!
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
How do I make checkpoints? Like you clear out one area, move over a bridge and die on the other side, how do I make the units respawn after the bridge?
Do I need something like let's say a trigger area named "checkpoint1", looks like this:
*** IF ***
    [???] Player 'player0/player1' has units in  area 'checkpoint1'.
*** THEN ***
  [???]Enable Script 'checkpoint1'.
The enabled script:
*** IF ***
    [???] Unit 'Lotus or Agent' has been destroyed.
*** THEN ***
  Null operation. (Does nothing.)
How did you do it?
Rank up!
i^love^mixery
14 years ago
well.. checkpoints are a rather easy thing. i can explain the basics of how i would do it:

1. well chosen triggers, that detect how far youve come in the mission. create a counter with the name "checkpoint".
set the counter to 0. when you completed a specific area or when you reached a specific safe zone then "checkpoint" will be set to 1, later to 2, 3, 4, whatever.

2. then you use some *IF* condition and create scripts similar to this:

*IF*
All units of the human players are dead
AND
Counter "Checkpoint" is equal to 0
*THEN*
Respawn the units @ waypoints checkpoint0 etc.


*IF*
All units of the human players are dead
AND
Counter "Checkpoint" is equal to 1
*THEN*
Respawn the units @ waypoints checkpoint1 etc.


*IF*
All units of the human players are dead
AND
Counter "Checkpoint" is equal to 2
*THEN*
Respawn the units @ waypoints checkpoint2 etc.

of course you have to disable "Deactivate uppon success" in this respawn scripts. and remember to always use the same names for that units and that you always have to run the transfer script again after a respawn. if you want to run a scipt again, then just use a script to ENABLE it again. (thats how this scripts work. they will just be disabled after the condition comes true [unless you deselect "deactivate uppon success])
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
Okay well that looks simple, except that I haven't really used any counters, how exactly do they work?
Rank up!
i^love^mixery
14 years ago
counters are variables. they dont increase or decrease on their own. you can set them to values, read out their value etc.
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
Okey, I'll try this idea now, thanks.
Rank up!
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
Let's say I have my 1 Agent, 1 Lotus, 2 Rangers and 2 Red Guards, how do I make a script/scripts that tells only Lotus and the Agent to respawn if the Rangers and the Red Guards have been killed (before the checkpoint)?
Rank up!
Drummin
14 years ago
FYI. Counters are great for general game timers instead of making a slew of individual timers.
Code:
*** IF ***
    True.
*** THEN ***
  Set 'Time' to  0
  Enable Script 'StartTime'


Notice I have the script above activate the counter script below and the settings set it to re-evaluate every second.

Script Name: StartTime [ns na D]
Code:

*** IF ***
    True.
*** THEN ***
  Add  1  to counter 'Time'

As i^love^mixery pointed out you can SET a counter to a value as well for "counting" things that happen.

Let's say I have my 1 Agent, 1 Lotus, 2 Rangers and 2 Red Guards, how do I make a script/scripts that tells only Lotus and the Agent to respawn if the Rangers and the Red Guards have been killed (before the checkpoint)?


Maybe break this "team" into several groups to identify if team "Rangers and the Red Guards" is destroyed, thus triggering your respawn of the "agent and lotus" team.

VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
The map is a co-op mission and therefore it's no team but instead each of the units are named, I think i^love^mixery did that. Anyways, I have to do lot's of scripts for the respawn/checkpoint to tell which units are to be spawned:
***IF***
     unit 1(Lotus) is destroyed
***THEN***
     disable mouse and keyboard input
     something like "camera subtracts to black taking 10 frames hold for 100 and decrease 10"
     set timer "Checkpoint1" to expire in 3 seconds

And then something like:
***IF***
     timer "Checkpoint1" has expired
***THEN***
     reset camera to waypoint "respawn1"
     enable mouse and keyboard input
     brief something "You have been reset to the last checkpoint."

And then I have to do this for ALL of them?
Rank up!
i^love^mixery
14 years ago
no. you have to find a condition when you respawn ALL of them at once. for example:

if all of them are dead you start the countdown.

if the countdown expired you run the script which checks the "checkpoint" counter to respawn all the units at once at the related checkpoint waypoints.

so all in all you need something like this:

Put ALL the following scripts into a new folder into SkirmishGLA scripts:

Detection script (do NOT deselect "deactivate uppon success"):

*IF*
Unit 1 is dead
AND
Unit 2 is dead 
AND
Unit 3 is dead
AND
Unit 4 is dead
AND
Unit 5 is dead
AND
Unit 6 is dead
*THEN*
Set Timer "Respawn" to expire in 5 seconds.

Respawn script 0 (deselect "deactivate uppon success"):

*IF*
Counter "checkopint" is equal to 0.
AND
Timer "Respawn" expired
*THEN*
Set Timer "Respawn" to expire in 100000 seconds.
Spawn Unit 1 of type Lotus on Team SkirmishGLA at waypoint Respawn0_1
Spawn Unit 2 of type Redguard on Team Skirmish GLA at waypoint Respawn0_2
Spawn Unit 3 of type Redguard on Team Skirmish GLA at waypoint Respawn0_3
Spawn Unit 4 of type Redguard on Team Skirmish GLA at waypoint Respawn0_4
Spawn Unit 5 of type Ranger on Team Skirmish GLA at waypoint Respawn0_5
Spawn Unit 6 of type Burton on Team Skirmish GLA at waypoint Respawn0_6
Enable Script "Unit Transfer1"
Enable Script "Unit Transfer2"
Enable Script "Detection script"

Respawn script 1 (deselect "deactivate uppon success"):

*IF*
Counter "checkopint" is equal to 1.
AND
Timer "Respawn" expired
*THEN*
Set Timer "Respawn" to expire in 100000 seconds.
Spawn Unit 1 of type Lotus on Team SkirmishGLA at waypoint Respawn1_1
Spawn Unit 2 of type Redguard on Team Skirmish GLA at waypoint Respawn1_2
Spawn Unit 3 of type Redguard on Team Skirmish GLA at waypoint Respawn1_3
Spawn Unit 4 of type Redguard on Team Skirmish GLA at waypoint Respawn1_4
Spawn Unit 5 of type Ranger on Team Skirmish GLA at waypoint Respawn1_5
Spawn Unit 6 of type Burton on Team Skirmish GLA at waypoint Respawn1_6
Enable Script "Unit Transfer1"
Enable Script "Unit Transfer2"
Enable Script "Detection script"

Unit Transfer1 (do NOT deselect "deactivate uppon success", but deselect "Script is active"):

*IF*
Unit 'transfer house 1' is owned by Player 'player0'
*THEN*
Unit '1' is transferred to the command of Player 'player0'
Unit '2' is transferred to the command of Player 'player0'
Unit '3' is transferred to the command of Player 'player0'
*ELSE*
Unit '1' is transferred to the command of Player 'player1'
Unit '2' is transferred to the command of Player 'player1'
Unit '3' is transferred to the command of Player 'player1'

Unit Transfer2 (do NOT deselect "deactivate uppon success", but deselect "Script is active"):

*IF*
Unit 'transfer house 2' is owned by Player 'player1'
*THEN*
Unit '4' is transferred to the command of Player 'player1'
Unit '5' is transferred to the command of Player 'player1'
Unit '6' is transferred to the command of Player 'player1'
*ELSE*
Unit '4' is transferred to the command of Player 'player0'
Unit '5' is transferred to the command of Player 'player0'
Unit '6' is transferred to the command of Player 'player0'


Of course you need checkpoint scripts which set the counter "checkpoint".

checkpoint = 0 means, that you havent reached the first checkpoint yet.

if you reach something like "checkpoint area 1" with any unit
then you set the counter checkpoint to 1

of course you can create more checkpoints, then you of course have to copy the script "
Respawn script 0" and set it for checkpoint 3, 4, 5 whatever.

If you still cant do it, upload your map and ill script it for you.
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
I get what you mean I just had a little problem with the counter parts, but I'll try it again and tell you if it works or not, thanks.
Rank up!
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
I did spawn the units on the SkirmishGLA team but only two of the units spawn, and for some reason they didn't transfer to me, I messed up somewhere as usual... Also why doesn't the choppers attack the specified area?   Birds nest.rar (125kb) downloaded 12 time(s).
Rank up!
i^love^mixery
14 years ago
use this:
Unit 'Chopper1' use Ability 'Command_AttackMove' at Waypoint 'High ground unit 4 spawn'.

instead of:
Unit 'Chopper1' attacks anything in  area 'Attack area for choppers'

also i dont quite get what the other problem was. the respawn thing worked perfectly here. maybe youve put SkirmishGLA into the second lobby slot instead of third?

also im in hamachi now ..
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
What kind of scripting should I use for the abandoned base?
What I mean is that you and your team mate are supposed to hold that point and defend it from enemy attacks from four directions, while waiting for the dozers to arrive.
Also, instead of the checkpoint system that I use now, what did you use instead?
PM if you don't want to post it here, thanks.
Rank up!
i^love^mixery
14 years ago
you could script the attacks like in an aod of course. just put the enemies into SkirmishGLA teams and spawn them.

but the problem about that one part is: what will happen if you fail to defend it? do you want that part to restart or do you want to end the game?

in my map i worked a lot with enabling and disabling folders for the missions. so m01p0 is the first mission for player0. if he beats mission 1 then the folder m01p0 will be disabled and the folder m02p0 will be enabled. thats basically how i did the checkpoints in my map..
VTULCobra
  • VTULCobra
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
I thought about the aod system...
Also I would like it to restart from where you start defending the base.
Could you be more specific about your folders? Thanks.
Rank up!