1-Ups for Campaign

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

1-Ups for Campaign

Post 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.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: 1-Ups for Campaign

Post 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?
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: 1-Ups for Campaign

Post 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.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: 1-Ups for Campaign

Post by Teancum »

I think there's a hidden mushroom msh somewhere in the mod tools. :P
Post Reply