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 / Can anyone help me with delaying a triggerzone untill a switch has been activated

Author
Message
Ranius
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location:
Posted: 6th Sep 2008 18:58
My scenario is i have a switch and triggerzone on the same grid. However i do not want the triggerzone(which will change the ambient light) to activate untill after i press the switch.

I've searched the forums and came across this

http://forum.thegamecreators.com/?m=forum_view&t=133654&b=23

However, this doesn't really help me as i do not know the ins and outs of objectives with fpsc.

If someone can either help me delay the triggerzone untill the switch has been pressed or direct me to some information about objectives i would be grateful.

P.S i have downloaded the guide, so if there is a certain section about objectives there can someone tell me what it is because i cant seem to find it.

Thanks in advance
4125
16
Years of Service
User Offline
Joined: 3rd Feb 2008
Location: Bronx, New York
Posted: 6th Sep 2008 20:08
.....i think with out scripting you can't do anything. People gotta know scripting these days such as myself! maybe an adanvced scripter know-it-all like Ply or Hybird could help. am gonna start learning this soon but until I get school stright I might not be able too...

Come Back When You Could put up a fight!!
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 6th Sep 2008 20:22
Objectives are designed for delaying the win zone only, not a trigger zone....try looking into making the trigger zone be activated by the switch, then when the player waljs in, it will do it's thing....

I'm not allowed to write the script for you, as per the sticky about requests.....

Ranius
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location:
Posted: 6th Sep 2008 20:44
I was originally thinking of having the switch 'ifused' as the triggerzone. However, as the triggerzone isn't an entity this method will not work.

Thanks for the replies and no problems about not being able to write the script for me. I think learning the whole FPI scripting language will be too complex for me, but i will have a look at some existing scripts and see if i can find anything close to what im looking for and adjust it.

If anyone else has any methods of completing this task then feel free to post them
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 6th Sep 2008 21:01
Quote: "However, as the triggerzone isn't an entity this method will not work."


It will, trust me...

FPI is easy to learn once you get the hang of it, it's the simplest of simple scripting, which is basically watered-down programming. Read up on Plystire's scripting tutorials, I used to be like you, and think "God! How am I meant to understand this?!" After reading throuh his tutorials, I got the hang of it, and gradually improved.....

Ranius
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location:
Posted: 6th Sep 2008 22:08
I'll have to give it a go then

I've just tried(and failed in doing so) setting the switch's 'ifused' to 'Trigger Zone'.

However as soon as i step into the trigger zone my ambient light changes. My code for the trigger zone is



Where it says plrwithinzone=1 i am assuming that needs to be changed inorder for the switch to trigger it rather than just standing in the zone?
Ranius
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location:
Posted: 7th Sep 2008 00:00
I got it working , slightly different to the method i had originally thought of.

I placed the decal 'rubble' as my trigger zone instead of on actual trigger zone. I set its spawn at start to 'no'. I gave this the ambiance light script. I then made the 'ifused' in the switch settings activate the rubble. After hitting the switch the rubble spawns and the lighting changes.

Im sure there would be someway to do this without having to spawn the rubble via a script, however this will do me for the time being .

Thanks for all the input by the way guys, have a penguin
4125
16
Years of Service
User Offline
Joined: 3rd Feb 2008
Location: Bronx, New York
Posted: 7th Sep 2008 03:44
crap! another new scripter! I gotta keep up now. but am wayy too lazy...

Come Back When You Could put up a fight!!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Sep 2008 05:36
@Ranius:

The reason your first attempt at the triggerzone being activated failed is because you were missing one important condition in the script: "activated=1"

When you want to have something "wait" until it is activated you need to do two things:
1) Have the activator run the "activateifused=X" command, where X is a number you want to activate the other entity with.
2) The activated entity must check for "activated=X", where X is the number that your activator used in it's script.

This will work for any kind of entity, even zones.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.

Login to post a reply

Server time is: 2024-11-24 13:49:56
Your offset time is: 2024-11-24 13:49:56