Choosing weapon and character mod.

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
Ginev
Command Sergeant Major
Command Sergeant Major
Posts: 260
Joined: Thu Apr 02, 2009 7:02 am
Projects :: Remaking FR Battlefront 3 Tatooine map.
Games I'm Playing :: nothing for now
xbox live or psn: No gamertag set
Location: Bulgaria

Choosing weapon and character mod.

Post by Ginev »

Today i found a mod map where you can choose a weapon of your choise and a character from the CP nearby to play with.I tryed to find the creator of the mod and i think its called Syth however he is not active here since 2012.Is there someone else who can make a tutorial and explain to us how he is doing this thing?I really want to make a survival map with weapon choise instead of switching my class.The only one else i know that made such thing is Maveritchell however i dont think he have time to bother anymore with us.I really need some sort of tutorial.One such tutorial could help people make more maps like that.

This is the mod that i am talking about.All the weapons are on the wall and you go close to them and select them.How he is doing that? :sick:

https://www.youtube.com/watch?v=9Wqao86VxJE

watch from 2:06
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: Choosing weapon and character mod.

Post by ForceMaster »

The only way (I think) you can do it is using the SetClassProperty() function with a trigger event OnEnterRegion(). Every Weapon choosable needs a region for trigger the change in that class. When you enter in that region the function SetClassProperty("name_of_your_unit_class", "WeaponName1", "new_weapon_name") change the class , due you need re-select your unit in the CP to "load" your changes in your soldier. You need to set up some scripted event like the disguise code to get new mesh in the class and only for your current unit (I lost the autor...). Search in the forum by disguise. You can find a helpfull examples.
User avatar
Ginev
Command Sergeant Major
Command Sergeant Major
Posts: 260
Joined: Thu Apr 02, 2009 7:02 am
Projects :: Remaking FR Battlefront 3 Tatooine map.
Games I'm Playing :: nothing for now
xbox live or psn: No gamertag set
Location: Bulgaria

Re: Choosing weapon and character mod.

Post by Ginev »

I searched alot but could not find any usefull information.If someone really know how to set this script into my map i would be really happy since i dont have idea...
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Choosing weapon and character mod.

Post by Nedarb7 »

It looks like regions might have been used along side SetClassProperty. I imagine it would have looked something like this:

Code: Select all

weaponOptionRifle = OnEnterRegion(
	function(region, character)
		if IsCharacterHuman (character) then                                                             -- Only update if human character
			SetClassProperty("rep_inf_trooper", "WeaponName1", "rep_weap_inf_rifle") -- Set the class property
		end
	end,
	"weaponOptionRifle" -- Name of the region
)
Post Reply