Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / NPC activate switch (Remote Door)

Author
Message
Tomik18
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 3rd Aug 2014 17:38
any idea how make NPC activate switch ? (Remote Door)

My PC specs: AMD Phenom X4 B60 3,30Ghz
4 GB RAM
GTX 560 1GB DDR5
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 4th Aug 2014 00:48
Quote: "any idea how make NPC activate switch ?"


Yes, a few of them. Off the top of my head, use the command anywithinzone...



Take a look at a standard switch script...



You would need to remove the plrdistwithin and replace with the anywithinzone, and the plrusingaction would also be no use. I would use an "etimer" and have a pause making it look like the NPC walked up to the switch, paused right in front, and activated it. The switch script would run the anywithinzone=x command and when the NPC is in the zone, use the "etimer" to give a pause before the switch activates the door (or whatever it activates).

Not hard to achieve using the basic commands available. Refer to the Script Syntax for listing. Also refer to your "Docs" folder for the Official Community Guide which has a tonne of information that is valuable. If you don't have it, look here.

There's no problem that can't be solved without applying a little scripting.
Tomik18
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 4th Aug 2014 08:23
sorry but I'm not good at writing scripts. could you write me the script?

My PC specs: AMD Phenom X4 B60 3,30Ghz
4 GB RAM
GTX 560 1GB DDR5
Abdulilah Saleh
10
Years of Service
User Offline
Joined: 14th Dec 2013
Location:
Posted: 5th Aug 2014 09:11
Tomik18

Click the code snippet
Tomik18
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 5th Aug 2014 18:15 Edited at: 5th Aug 2014 18:17
so code maybe look like this ?



i put the code into the main in Trigger zone charecter movement throught the Trigger zone but switch stay deactivated

My PC specs: AMD Phenom X4 B60 3,30Ghz
4 GB RAM
GTX 560 1GB DDR5
Corno_1
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 6th Aug 2014 12:20
first just use one anywithinzone! delete the other with anywitinzone=50. This may cause issues. also you must write the name of the door in the if use field of the triggerzone.
Another point: you can not have a single entity in the zone!
What I also recommend: replace the anywithinzone=50 with plrwithinzone=0, so the plr can not activate it themself

Games make the world better
Tomik18
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 6th Aug 2014 14:21 Edited at: 6th Aug 2014 14:22
so code maybe look like this ?



My PC specs: Intel Core i5 2430M 2,40Ghz
4 GB RAM
GT 540M
Corno_1
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 6th Aug 2014 14:25
Why didn´t you simply try it? What can happen? Two possibilities: 1. It works 2. doesn´t work

Games make the world better
Tomik18
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 6th Aug 2014 16:08
2. doesn´t work..... please help

My PC specs: Intel Core i5 2430M 2,40Ghz
4 GB RAM
GT 540M
Meows
12
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 8th Aug 2014 21:46
Ok have some fun, Why use a remote when you can have her walk back and forth through a door depending on what side of the door the player is on. FPM and game in download and script.

Sorry gamecreators not allowing the 18 meg file to upload.. post and I can send it to you.


I use this edited for what ever I want the npc to do. like give a quest. or mission., or a extra life. ammo, weapon etc.. just pause and invis the walker and popup a clone to do what you need done and then destroy the clone and re-invis the walker.



Login to post a reply

Server time is: 2024-03-28 15:47:58
Your offset time is: 2024-03-28 15:47:58