Weapons, on and off?

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
GMer
Posts: 329
Joined: Thu Oct 25, 2007 4:49 pm
Location: On the rock in the 3rd solar orbit.

Weapons, on and off?

Post by GMer »

I'm a little unsure if I'm posting this in the right place...
How can you make a weapon usable (visable, selectable) in one level, and unusable(invisible, unselectable) in the next? :mrgreen:
Over 3 years (has it been that long?) and just now I noticed the day and month of my birthday were switched. Whoops!

Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Re: Weapons, on and off?

Post by darksmaster923 »

When the level changes, simply take the weapon away from the player. There are several ways you could do this. I prefer using a script where I can use the SetAttribute command to take the weapon attribute away from the player.ini file. I am pretty sure you could do this with an entity, but I don't have much experience with entities, since I usually just replace them with scripts.
Herp derp.
User avatar
GMer
Posts: 329
Joined: Thu Oct 25, 2007 4:49 pm
Location: On the rock in the 3rd solar orbit.

Re: Weapons, on and off?

Post by GMer »

Just have a script attached to an "invisible" actor in the desired level like so:

Spawn{() (or whatever)
weapon# = false

and to switch back, change to true
Over 3 years (has it been that long?) and just now I noticed the day and month of my birthday were switched. Whoops!

Some 2d games I made, haven't made anything in a year though O.o
http://www.yoyogames.com/users/GMer56
Post Reply