Page 1 of 1

Random Control Point position..

Posted: Fri Oct 30, 2009 2:18 pm
by fo0k
So assume you start in the middle of a very, very large map.

This is a desert rally style map... I want the racers to have to try and reach a control point on the edge of the map but it would be interesting if that final destination varied each time the map loaded. I could just spawn people randomly around the edge and then they all race to the middle.. but this will mean everyone races seperatly which is kinda dull.. would be better if they raced as a group.

I know that CP's attached to PCO's is not an option (from my experience so far...) but maybe there's a weird way to do achieve this?


A second thought on this.. now getting pretty weird.. but maybe do have the players start on the outside edge of the map and have them race to the middle.. but from a random spawn location each time. I want everyone to spawn together though in the same (but different at the start of each round) location. Im staring to think about a flying PCO thing that shoots (in a random direction) from the middle of the map to the outer edge and this then acts as a player and vehicle spawn point for the round..

Re: Random Control Point position..

Posted: Fri Oct 30, 2009 6:07 pm
by freddy
fo0k wrote: (but different at the start of each round)
you could do this with the random spawn code, take out the criticalDamage from the willy, change the fighter planes to vehicles that have soldierspawns (eg subs and ships), adjust the soldierspawnoffset on the different vehicles to where you want the soldiers to spawn. the spawn will change every time the map restarts. this i know works.

code (without the changes)

Code: Select all

ObjectTemplate.Active Willy
ObjectTemplate.criticalDamage 50
ObjectTemplate.hpLostWhileCriticalDamage 0.4
ObjectTemplate.addTemplate DestroyerSpawner
ObjectTemplate.setPosition 0/-1199.7/0
ObjectTemplate.setRotation -3/-13/0
ObjectTemplate.setRandomGeometries 3


ObjectTemplate.create ObjectSpawner DestroyerSpawner1
ObjectTemplate.setObjectTemplate 2 Corsair
ObjectTemplate.setSpawnPositionOffset 0/-0.4/0
ObjectTemplate.SpawnDelay 10
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 120
ObjectTemplate.Distance 200
ObjectTemplate.DamageWhenLost 5
ObjectTemplate.team 2
ObjectTemplate.MaxNrOfObjectSpawned 4


ObjectTemplate.create ObjectSpawner DestroyerSpawner2
ObjectTemplate.setObjectTemplate 2 Spitfire
ObjectTemplate.SpawnDelay 10
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 120
ObjectTemplate.Distance 200
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.team 2
ObjectTemplate.MaxNrOfObjectSpawned 4


ObjectTemplate.create ObjectSpawner DestroyerSpawner3
ObjectTemplate.setObjectTemplate 2 Mustang
ObjectTemplate.SpawnDelay 10
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 120
ObjectTemplate.Distance 200
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.team 2
ObjectTemplate.MaxNrOfObjectSpawned 4
or try set the randomspawn directly to the spawner (havent tested this, dont know if it would work)

Code: Select all

Object.create DestroyerSpawner
Object.absolutePosition 743.7/49.1/237
Object.rotation 0/0/0
Object.setTeam 2
ObjectTemplate.setRandomGeometries 4


ObjectTemplate.create ObjectSpawner DestroyerSpawner1
ObjectTemplate.setObjectTemplate 2 Gato
ObjectTemplate.SpawnDelay 1
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.team 2
ObjectTemplate.holdObject 1



ObjectTemplate.create ObjectSpawner DestroyerSpawner2
ObjectTemplate.setObjectTemplate 2 Fletcher
ObjectTemplate.SpawnDelay 1
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.team 2
ObjectTemplate.holdObject 1



ObjectTemplate.create ObjectSpawner DestroyerSpawner3
ObjectTemplate.setObjectTemplate 2 Enterprise
ObjectTemplate.SpawnDelay 1
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.team 2
ObjectTemplate.holdObject 1


ObjectTemplate.create ObjectSpawner DestroyerSpawner4
ObjectTemplate.setObjectTemplate 2 PrinceOW
ObjectTemplate.SpawnDelay 1
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.team 2
ObjectTemplate.holdObject 1

a third way (and the best one i think) is if you just spawn a vehicle with a soldierspawner, removetemplate the soldierspawner from the vehicle, add this soldierspawner to different small vehicles and let them spawn random (or at mapstart) at different places.

edit: i dont know if the setRandomGeometries could work directly on controlpoints, but that would be even better if it does. go try ;)

edit2: this is all serversidecode code btw.

Re: Random Control Point position..

Posted: Fri Oct 30, 2009 11:21 pm
by Leapord
There is a way to do this very simply. But I forget it now So i will post back when I remember.

Re: Random Control Point position..

Posted: Sat Oct 31, 2009 2:48 am
by MR PINK BALLS
I belive iced earth had a thread about this ,I think the end result was a rotation bundle

Re: Random Control Point position..

Posted: Sat Oct 31, 2009 2:29 pm
by datoneer
You can put a Control point on a rotational bubble? :shock:

Re: Random Control Point position..

Posted: Sat Oct 31, 2009 4:28 pm
by freddy
MR PINK BALLS wrote:I belive iced earth had a thread about this ,I think the end result was a rotation bundle
now when you mention it i think ivé seen something like that to, in some thread :mrgreen:

something like a putting in a windmill and stuff the spawner to the rotational bundle.

Re: Random Control Point position..

Posted: Sun Nov 01, 2009 8:48 am
by RuBBa_cHiKiN
datoneer wrote:You can put a Control point on a rotational bubble? :shock:
Yeah, you can put a control point on pretty much any child object within the parent PCO object, I think. This is a wild guess though, but it would make sense logically, because you can put spawns as direct children of PCOs, and since you can put stuff like cameras within rotational bundles of PCOs, it should be possible.

Also, this is just from my experience, but everytime I loaded a map with custom objects, the vehicle's randommesh would always start off being the same colour. The only way to change it was from a restart through the console. However, are you planning to just restart it through the console, which multiple rounds do anyway?

Re: Random Control Point position..

Posted: Mon Nov 02, 2009 12:26 am
by fo0k
you are telling me you can put a control point on a pco?

like have epic CTF chasing a control point around...?

that I have to see. prove your worth .. lols

Re: Random Control Point position..

Posted: Mon Nov 02, 2009 11:47 am
by RuBBa_cHiKiN
Oh oops, I meant spawn points. :oops:

Re: Random Control Point position..

Posted: Mon Nov 02, 2009 5:17 pm
by Apache Thunder
lol yes. Put a control point on anything destructible or something that would otherwise wouldn't be around when the round ends = epic CTD. I've already tried. :(

I've heard that BFV however can handle destructible CPs correctly though.