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 / Having a SPECIFIC entity within zone to open door?

Author
Message
Lethal
14
Years of Service
User Offline
Joined: 28th Sep 2010
Location: U.S.
Posted: 28th Sep 2010 21:57
okay, I know about playertake and player drop through the right mouse mutton, and about anywithinzone, but...

How would one set up so that if I pick up say, the bust of some statue, and place it in a zone (like on some pedestal) the door opens?

what I mean to say is... if I do like...


:state=0:dimvar=bustonstatue ,setvar=bustonstatue 0,state=1
:state=1,varequal=bustonstatue = 1:activateifused=1,destroy

and then how would i get it so that placing THAT particular entity (labeled 'bust') in the zone, would open the door?

I would aos make it so that it wouldn't have to be a precise balancing act, taking the two pieces, bust, and pedestal, destroying them, and spawning a bust on a pedestal for added coolness...

I've tried various methods, and I'm not looking for someone to do this for me, just a point in the right direction, or a link to a script where this has already been implemented.

My sig is too cool to display.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Sep 2010 01:34
If you're using V1.17 or any mod with AirMod implemented (Though, not sure if v1.17 has this command implemented yet) I believe there is a "setusekey" command (or something along those lines).

You can use that command to set the zone's "UseKey" entity, to tell the name of the entity that should act as it's key. After you have that set, you can use "anykeywithinzone=1" to determine if that key is within the zone.

Hope that makes sense and you can get it working.

NOTE: If you can't find the command for setting the "UseKey" property, you can always make a custom zone and give it a specific UseKey value in it's FPE file.


The one and only,


zeza
16
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 29th Sep 2010 01:42
Lee always meant to put this in to FPSC (he has a TODO in the source), but he never did. I actually tried to do it, but I'm having problems in-game with some of my other code, but thats beside the point. There is a workaround for this. Set the bust as the target using settargetname=x, then checking if it is nearby with reachtarget. I don't think you can use aitargetdistwithin for this since the zone is not part of the darkai system, but I will have to check that.

I'd change the world, but I don't have the source code
R.I.P. heltor, we will miss you
Lethal
14
Years of Service
User Offline
Joined: 28th Sep 2010
Location: U.S.
Posted: 29th Sep 2010 06:57
hmmm, I could try to do that, but then wouldn't that make the item (being the bust) actually disappear as a key for inventory?
(which I could still do a workaround for, showing a hud if playerhaskey or something, sort of like the oldschool Doom II Keys thing...

I just really liked the idea of picking up that item, having it hover in mid air in front of me, and then as I placed it down on the pedastal, that door creeps open, and


...out pours the bullet-sponges...


Thanks a lot for your help, I'll figure it out, but would be really cool if when someone makes a 1.17 community guide, they include a script to do this, cause I guarantee, it'd be a big addition for those Resident Evil style puzzles...

My sig is too cool to display.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Sep 2010 07:02
Well, since I was able to do what he's asking without a Mod, back in v1.07 I don't see the need for any of these new things. I've already described the method and I know for certain that it works.


The one and only,


TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 29th Sep 2010 23:39
Add a remote door.

Add a pedestal entity. In the main script, add the condition anywithin=10 and an action activateifused=1. In the ifused paramter of the pedestal, enter the name of the remote door.

Add a statue. Ensure it's dynamic.

Picking up the statue and moving it within 10 units of the pedestal will open the door.

By trial and error, in reducing the 10 to say 1, you might be able to open the door if the statue drops onto the pedestal.

The downside of all this is that moving ANY entity onto the pedestal will open the door. I am sure there is a way round this. Will let you know.
Lethal
14
Years of Service
User Offline
Joined: 28th Sep 2010
Location: U.S.
Posted: 1st Oct 2010 10:09
Tzap, I think I figured it out...

if the specific object entity is picked up, I createvar=1, setvar=1
if the object is dropped I place a delay of say 6000, and then setvar 1= 0

on the pedestal, I do the whole anywithinzone, but also do it as same state, if the variable 1 is 1 THEN go to that next state, otherwise do not...

each entity that I would want to move would have a different variable for moving... If anyone wants to turn this into a plug-and-play scrpit with a lot less redundancy, feel free to let me know.

My sig is too cool to display.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 1st Oct 2010 20:43
Makes me wonder if anyone read my post at all.


The one and only,


zeza
16
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 1st Oct 2010 22:36
Quote: "Makes me wonder if anyone read my post at all."

I fit makes you feel any better, I read your posts

I'd change the world, but I don't have the source code
R.I.P. heltor, we will miss you
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Oct 2010 02:37
It does, thank you.


The one and only,


Lethal
14
Years of Service
User Offline
Joined: 28th Sep 2010
Location: U.S.
Posted: 2nd Oct 2010 03:03
well, if you could link me back to your post about specific entities... I'd definitely be interested in re-reading it. The only post I saw of yours talked about ANY entity being within a zone...

I don't want any entity, I want a specific entity being within a specific zone to trigger...

Please, if you could, link me because I'm having trouble finding this specific thread.

My sig is too cool to display.
Lethal
14
Years of Service
User Offline
Joined: 28th Sep 2010
Location: U.S.
Posted: 2nd Oct 2010 03:16
Actually not to double post, but as I'm a new member, I can't edit....

I DO see your Ply KeyWithinZone script, interesting stuff... I'll test it to see how it works and let you know.

My sig is too cool to display.
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 3rd Oct 2010 11:54
@Plystire:

anykeywithinzone=1 ? never heard of it or seen it .
I looked at the AirMod Manual , The addendum , FPIEditPad and PB , Fenix mod manuals but couldn't find it , Is it intergrated with AirMod , v1.17 or what ?

Best wishes , Cheers

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
zeza
16
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 3rd Oct 2010 20:57
Quote: "anykeywithinzone=1 ? never heard of it or seen it."

Well, its in the source, and it looks like it works, I guess its just another one of those commands that just got lost in the mix.

I'd change the world, but I don't have the source code
R.I.P. heltor, we will miss you

Login to post a reply

Server time is: 2024-11-24 19:21:02
Your offset time is: 2024-11-24 19:21:02