human activated regions

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
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

human activated regions

Post by Lorul1 »

I have a region that plays an animation but both AI and humans can activate it. I would like to know if there is anything I can add to my script to make only humans activate it, and i would also like to know if it will work in multiplier mode.
Thanks in advance :D
LRKfm946
Master Sergeant
Master Sergeant
Posts: 163
Joined: Sun Feb 02, 2014 6:13 pm
Projects :: Battlefront II Hunger Games
Games I'm Playing :: SWBF2 BF3
Contact:

Re: human activated regions

Post by LRKfm946 »

Use IsCharacterHuman:

Code: Select all

RegionTrigger = OnEnterRegion(
      function(region, character)
	
		       if IsCharacterHuman(character) then

                        --Your code here

		        end

	    end, 
	    "region_name")
Post Reply