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.
1-Ups for Campaign
Moderator: Moderators
- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: 1-Ups for Campaign
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?
- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: 1-Ups for Campaign
Gotta read that doc. And no, I know how to increasreinforcements (looked at stock campaigns, simple enough).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?
Thanks as always for your help Mav.
This topic can be locked.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: 1-Ups for Campaign
I think there's a hidden mushroom msh somewhere in the mod tools. 
