Page 1 of 1
Not allow cp selection
Posted: Sun Mar 29, 2009 8:30 pm
by ryukaji
How would I make it so that I automatically spawn at a certain cp, with no choice to select, and then how could I change it?
Im making a map where you fight alone in a building full of monsters, and the goal is to get to a portal to the next level, so I would need to make it so if they die on level 2 they start at the beginning of level 2 rather than repeating lvl 1 to get back to 2
Re: Not allow cp selection
Posted: Sun Mar 29, 2009 9:42 pm
by jangoisbaddest
ryukaji wrote:How would I make it so that I automatically spawn at a certain cp, with no choice to select, and then how could I change it?
Im making a map where you fight alone in a building full of monsters, and the goal is to get to a portal to the next level, so I would need to make it so if they die on level 2 they start at the beginning of level 2 rather than repeating lvl 1 to get back to 2
You'd have to get into LUA programming for that kind of work. Read up on the "Battlefront2_scripting_system" documentation in the modtools, and then search the site for the grand list of LUA functions (I think it's in the FAQ/Everything you Need thread).
Also don't forget that you can't have one playable area directly over another (in other words, buildings with floors is impossible in this game if you want the AI to function properly).
Re: Not allow cp selection
Posted: Sun Mar 29, 2009 9:58 pm
by ryukaji
I didnt mean like height "levels" I already have that figured out with the teleports rather than an elevator, and you can get stacked playing areas to work fine if they are the same area which I will have on some of the levels. I read through a lot of the scripting but im really no good at that I need some expert help with it, im sure its pretty simple. I could probably do with looking through the lua functions though
Re: Not allow cp selection
Posted: Sun Mar 29, 2009 10:10 pm
by RepSharpshooter
Code: Select all
SpawnCharacter(character, GetPathPoint(spawnpath, node))
character = you, comes from somewhere, either a ondeathevent, or you have to search through the team and find him.
spawnpath = name of one in ZE
node = which node on spawnpath (0, 1, 2 ...)
Or you could go the easy route and use:
Code: Select all
--at begining
KillObject(cp2)
KillObject(cp3)
KillObject(cp4)
--when you complete objective
KillObject(cp1)
RespawnObject(cp2)
--when you complete another objective
KillObject(cp2)
RespawnObject(cp3)
Basically turning on/off cps
Re: Not allow cp selection
Posted: Sun Mar 29, 2009 10:13 pm
by ryukaji
Oh... thanks ill have to try that so make it like a campaign script
Re: Not allow cp selection
Posted: Sun Mar 29, 2009 10:16 pm
by RepSharpshooter
Yeah either use an OnEnterRegion to trigger the next level, or you may want to make it a kill all the monsters first objective.
Either way, play the Geonosis training campaign, then look at its script. Knowing what the campaign does, then looking at the script should give you an idea what the code is doing. (that campaign features many different objectives and is a good starting place).
Re: Not allow cp selection
Posted: Mon Mar 30, 2009 4:08 pm
by Fiodis
jangoisbaddest wrote:Also don't forget that you can't have one playable area directly over another (in other words, buildings with floors is impossible in this game if you want the AI to function properly).
Not true. It's that the AI planning can't handle stairs. If you have a level directly over another floor, it's perfectly ok if there are no obstacles in the way of the planning hubs from the floor below.