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 Product Chat / Scripts are my best *cough* worst *cough* friend

Author
Message
White Mail Revived
19
Years of Service
User Offline
Joined: 12th Feb 2005
Location:
Posted: 27th Mar 2005 08:31 Edited at: 27th Mar 2005 08:34
I have a problem with scripts. If you had seen my other post, you would notice this. I was in the middle of making a level and I had an idea. Why don't I make a fake wall that dissapears when you walk through a trigger zone! It seemed very logical but it turned out not to be. I looked at some post on these forums for basic scripting/etc help and made a trigger zone, putting the name of the fake wall in the "if used" section like you would remote door. I tried it out but nothing happened when I walked in it. I can't find any script functions for this that work. Is it the fact that you can't make walls have door properties? I am lost so It may take paragraphs or a simple sentence to understand this. I have included pictures of the floors with diagrams pointing to important spots. The red is the trigger zone that I moved from next to one fake wall with a gun so you can actually get through. That wall is not the big story problem but is there because of another problem I want fixed(either in code/v1 or script)of having the option of making gantries be able to jumo over or not(like an invisible wall). The green arrows are fake walls and the blue is a locked door.(key is on third level, see later, next to other trigger zone but not visible from this far away.) On the next level, the purple arrows are where ladders are, incase you want to see. On the third, the yellow is the important trigger zone with key. Please give me a tip, even if I just missed something simple because I usually do and
i slap myself on the face and say "why didn't I think of that!" Here they are! Also is the map file for it(download).





[edit] oops! forgot what i wanted to add!

1% done... [href]www.x-streamsystems.tk[/href]

Attachments

Login to view attachments
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 27th Mar 2005 22:01 Edited at: 29th Mar 2005 00:48
The script funktions you are looking for are the action "activateifused" for the Trigger script and the condition "activated" for the Wall script.

If the Trigger script executes the action activteifused=1 the condition activated=1 in the Wall script will be true.

Or if the Trigger script executes the action activteifused=5 the condition activated=5 in the Wall script will be true.

The Trigger (Main) script:


Edit: This script is already in the scriptbank folder. I just have not seen it
The script name is "zoneactivate".
The only differnce is that the zoneactivate script plays a sound if you enter the zone.


And the Wall (Main) script:



runfpidefault=2 runs the destroy script...the wall will disappear.

If you dont want that the player can destroy the wall with a gun you have to set Strength to 0.

Edit: Dont forget to type the name of the wall in the If Used field of the Trigger.

Hope that helps.
Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 28th Mar 2005 06:53
hey ctm could you pretty pretty please try to make a script so when you walk into a zone a door opens and 3 enimies come running though. I really need that script...


The hole idea of SMARTGUY is the SMART part in it
guy1
19
Years of Service
User Offline
Joined: 1st Mar 2005
Location: Hell
Posted: 28th Mar 2005 09:39
lol!!! Me too!
guy1
19
Years of Service
User Offline
Joined: 1st Mar 2005
Location: Hell
Posted: 28th Mar 2005 09:50 Edited at: 28th Mar 2005 09:54
i would also like a script that when you walk into a trigger zone it make some guys come from behind the wall and a script that if you walk in a trigger zone it makes 5 objects that are long rectangles come up in the air,all in different hights.
here is a example. ------- is the floor and | are the bars.don't worry about the pireids.

AFTER
.|..|..|..|
.|..|..|..|
.|.....|..|
..........|
..........|
-----------------------

Is that a good exmple?

BEFORE
.|..|..|..|
.|..|..|..|
.|..|..|..|
.|..|..|..|
-----------------------
OK?

thanks.
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 29th Mar 2005 00:24
@smartguy
The scripts you need are already in the scriptbank folder.

Attach the "zoneactivate" script to the Trigger and use a Remote Door.
If there are other Remote Doors in your level give the Door a other name and type this name in the If Used field of the Trigger.

I have tried it with NPCs that run the pace (Main) script and the shootclose (Shoot) script and it worked fine. But you should make sure that there is enough time for the NPCs to see the player else nothing will happen.

A other way may be to make the NPCs run to a waypoint from where they can see the player but i have not experimented much with the NPC AI scripts yet.

@guy1
There seems to be something wrong with the "moveup" funktion.
It works only correct if the player is very very close to the moving entity.
Maybe we have to wait for the V1 and hope that the problem gets fixed.
Bored of the Rings
User Banned
Posted: 30th Mar 2005 18:07
Hi,

I tried the "fake wall" scenario as mentioned above and could not get it to work. I created a room with a "fake wall" using a fake wall entity supplied with FPSC (dynamic). I then added in the trigger zone entity and used the 'zoneactivate' script as smartguy suggested. In the 'zoneactivate' script, I entered the name of the fake wall (in this case 'Fake Wall 1') and made sure both the fake wall and trigger zone main scripts were exactly as described in the code snippets above. The trigger zone was placed before the fake wall, but when I tested the game it didn't work. I tried to change the values of activateifused and activate to 5, but this didn't make any difference. I ensured the correct fake wall entity name matched the 'ifused' name in the 'triggerzone' entity properties. I also checked that STATE was correctly set. Oh I also found that the 'movefore' and 'moveback' functions don't appear to work correctly. I got an entity to move forward but not back when I used the following code: -

:state=0:movefore=5,state=1
:state=1:moveback=5,state=2

I'll give the 'fake wall' scenario another go, but if anyone has any ideas on why I can't get it to work, feel free to let me know.

thanks
mike
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 9th Apr 2005 00:44
There must be a Init script attached to the "fake wall" else it does not work.
You can use the appear1 script for that.

Login to post a reply

Server time is: 2024-11-23 01:15:19
Your offset time is: 2024-11-23 01:15:19