Scripts / Remote Trigger or switch help!

Author
Message
Earthpig_jr
15
Years of Service
User Offline
Joined: 31st Mar 2009
Playing: With the strings of the world
Posted: 13th Mar 2015 04:31
Hello all,

I am working on making a button that activates another entity so it can spawn. I have tried scripting it in, but i am not used to this style of scripting.

So what i would like to do is press e on an entity and have it activate the entity in it's "ifused" box, so that the other entity can spawn.
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 13th Mar 2015 05:19
Post what you have already done, It shows that you are trying and makes it easier for the other people to read it and make suggestions or show you an error spots.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 13th Mar 2015 14:11
Try at this link: https://forum.game-guru.com/thread/210052 about remote commands.
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fpsarea/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 13th Mar 2015 22:02
from the top of my head untested i would give this
remember to set the name of the hidden entity in the ifused field of the entity with this script

remote_spawn.lua
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 7th Apr 2015 18:52 Edited at: 7th Apr 2015 19:25
I also need help for switching the texture of one switch led (from the fpe switch: "textured = mytexture_off_d.dds"
to "textureALTd = mytexture_on_d.dds"). Some of ALTernate texture...
For example: when player is near switch before is activate, that switch have one LED red light and after activation,
the red LED is changing in green LED color.
Thanks in advance
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fpsarea/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."

Attachments

Login to view attachments
HarlsonRS
9
Years of Service
User Offline
Joined: 2nd Apr 2015
Location: Berlin, Germany
Posted: 7th Apr 2015 23:35
cool stuff... @smallg: is that doable in "reverse" mode, so let´s say you press a button and an entity DEspawns? ^^
PM
Old Larry
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 26th Apr 2012
Location: Bucharest, Romania
Posted: 8th Apr 2015 11:11 Edited at: 10th Apr 2015 13:29
Solved with this script (for the card reader):


I've used two separate entities with same script but separate texture - "EntityOFF"-red light texture, and "EntityON" -green light texture), and set on the entities option:
for the EntityOFF set: Static Mode = NO, Use key = key card, If Used = EntityON, Spawn At Start = YES.
for the EntityON (put to cover EntityOFF at exactly match for cover it) set: Static Mode = NO, Spawn At Start = NO.

Short video example here:


This scrip for the door (set in the door options Use key = key card, If Used = open door):


This script for keycard:

So, the card reader unit is used just to have more realistic scene, because the door can be opened anyway without that unit, just using the key card
Smile today, tomorrow could be worse

http://bestradiolarry.ro/fpsarea/

"The best forum, game software, operating system or web platform, it's that software which can give you most of the features and speed, not just amazing graphics."

Login to post a reply

Server time is: 2024-11-21 21:49:59
Your offset time is: 2024-11-21 21:49:59