1-Ups for Campaign
Posted: Wed Jan 28, 2009 7:06 am
Once again, I need some help with campaign lua stuff.
What I'm trying to do: make a 'life' system - whenever your clone (on his own team so the lives won't get wasted by other clones) picks up a dna pack (holocron item thing from kamino campaign) you get +1 Reinforcement. Most life pick-ups are out of the way of campaign objectives, in dangerous places or well hidden. They instantly get transferred to your score because the capture region for flags covers most of the map. They don't get picked up by Ai due to a lua line (AllowAIPickUp).
What I'm having a problem with is actually setting them up to give you +1 reinforcement each (doing them one at a time is no big deal). Which functions should I use to do this? Is there a function that 'reads' the number of flag points your character has and could this be used? Or should I use an OnEnterRegion function, and give each dna pack a tiny region around it that removes itself and gives + 1 reinforcement when entered???
Any help appreciated.
What I'm trying to do: make a 'life' system - whenever your clone (on his own team so the lives won't get wasted by other clones) picks up a dna pack (holocron item thing from kamino campaign) you get +1 Reinforcement. Most life pick-ups are out of the way of campaign objectives, in dangerous places or well hidden. They instantly get transferred to your score because the capture region for flags covers most of the map. They don't get picked up by Ai due to a lua line (AllowAIPickUp).
What I'm having a problem with is actually setting them up to give you +1 reinforcement each (doing them one at a time is no big deal). Which functions should I use to do this? Is there a function that 'reads' the number of flag points your character has and could this be used? Or should I use an OnEnterRegion function, and give each dna pack a tiny region around it that removes itself and gives + 1 reinforcement when entered???
Any help appreciated.