Page 1 of 1

1-Ups for Campaign

Posted: Wed Jan 28, 2009 7:06 am
by Sky_216
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.

Re: 1-Ups for Campaign

Posted: Wed Jan 28, 2009 7:10 am
by Maveritchell
You can do it however you want - there's a FlagPickup callback; be sure to look at the scripting_system doc for more info. I generally prefer regions; I think they're easier and more flexible (as long as you're making the map from the ground up). Either way works. Or did you need to know what to do to increase your reinforcements?

Re: 1-Ups for Campaign

Posted: Wed Jan 28, 2009 7:25 am
by Sky_216
Maveritchell wrote:You can do it however you want - there's a FlagPickup callback; be sure to look at the scripting_system doc for more info. I generally prefer regions; I think they're easier and more flexible (as long as you're making the map from the ground up). Either way works. Or did you need to know what to do to increase your reinforcements?
Gotta read that doc. And no, I know how to increasreinforcements (looked at stock campaigns, simple enough).

Thanks as always for your help Mav.

This topic can be locked.

Re: 1-Ups for Campaign

Posted: Wed Jan 28, 2009 12:14 pm
by Teancum
I think there's a hidden mushroom msh somewhere in the mod tools. :P