Page 1 of 1

Reassigning regions and spawn paths in the script [Solved]

Posted: Thu Sep 29, 2011 1:25 am
by Jaspo
I've got 2 ideas that would benefit from the ability to have cps and their accessories moved via the mission script, since the maximum number of cps seems to be firmly limited to 16, with no workarounds:
-my boonta eve classic racemap will theoretically use cps as race checkpoints where you respawn when you crash, and if the spawns could be relocated rather than killed and respawned, that would increase the number of racers and/or checkpoints available...up to 16 racers then, as opposed to 2 or 3 or 4.
-a map which would be a bunch of maps in one, with a "selection screen area" of sorts to choose which "compartment" of the map the battle would take place in. The cps and player would be teleported to the necessary spots for each map and then the ai would be allowed to spawn, and the battle would be effectively begun.

Initial experimentation indicates that the cp model can be teleported, though the glowing part didn't come with it, but since neither regions nor paths are entities, apparently, they cannot be teleported using SetEntityMatrix(). If there is are no similar functions for changing the matrix of regions or paths, this leads to the question of whether a new capture region and spawn path can be assigned to the cp after it has been moved...the regions and paths would be placed in the desired location in ZE but not initially assigned to the cp. Is it or is it not possible to link these things in the mission script? If so I don't know what the function is.

Re: Moving or reassigning regions and spawn paths in the scr

Posted: Thu Sep 29, 2011 4:53 am
by DarthD.U.C.K.
yes, you cannot move regions. i think i once tried changing an instanceproperty through lua and it didnt work but i probably missed something. anyway, the code to do this would be:

Code: Select all

SetProperty("cpname", "CaptureRegion", "regionname")
SetProperty("cpname", "SpawnPath", "pathname")

Re: Moving or reassigning regions and spawn paths in the scr

Posted: Fri Sep 30, 2011 6:14 pm
by Jaspo
It works, thanks!

Re: Moving or reassigning regions and spawn paths in the scr

Posted: Fri Sep 30, 2011 6:33 pm
by DarthD.U.C.K.
really? cool, i didnt expect that! :D

Re: Moving or reassigning regions and spawn paths in the scr

Posted: Fri Sep 30, 2011 11:49 pm
by Maveritchell
DarthD.U.C.K. wrote:really? cool, i didnt expect that! :D
Not to be all johnny-come-lately here, but the campaign missions do this all the time to toggle on and off the ability to capture command posts. Most of the time it's simply assigning it a null capture region (""), but the principle is the same.