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 / At wits end triggering a rock to dissapeer

Author
Message
3dMan
15
Years of Service
User Offline
Joined: 2nd Aug 2009
Location:
Posted: 2nd Aug 2009 21:53
As the title says, I'm at wits end. I have read the community guide ( Very informative btw ) and many other posts on how to do this, but nothing works.

My game is based on constantly changing while you play. Trigger zones, entity deaths, picking things up, etc will turn things on and off, make items appear and disapeer and so on. However, nothing's working for me. I've spent over a week trying to get just one script to work but it's not. I know it's me doing something wrong but I don't know what.

I have only been using other people's scripts letter by letter while I learn how to do them myself and the same thing seems to happen. Here's a scenario directly from the community guide about using a detonator to blow up a barrel, I just used a rock instead:

It blows up immediately when I load the level if the rock is set to dynamic. If set to static, nothing happens when I run over the trigger zone. This happens every time no matter what script I use.

It MUST be me doing something. What am I doing wrong? Any help would be appeciated.

Two primary things I want to do. 1. make something appear/disapeer when I kill an enemy, and 2. make something appear/disapeer when I walk over a trigger zone.
Apple Slicer
16
Years of Service
User Offline
Joined: 14th Nov 2008
Location: Oregon, in the rain...
Posted: 2nd Aug 2009 23:22
Static items do not use scripts.

What you are wanting to do is very easy, can we see what you do have?

Do you use Vanilla 1.15 FPSC? Use Apple Juice Mod! Totally free, and gives better speeds for your game!
3dMan
15
Years of Service
User Offline
Joined: 2nd Aug 2009
Location:
Posted: 3rd Aug 2009 00:23
Thanks for the reply and I'm sure it's very easy. However, this scripting is like greek to me until it clicks. LOL. Once it clicks, I'm sure I'll be writing my tail off. Until then, I'm using other people's script to get used to it. Lets use a script from the community guide I've been playing with:

;Artificial Intelligence Script
;Header
desc = Instant On
;Triggers
:state=0,activated=1:spawnon,setalphafade=100,runfpidefault=1
;End of Script

The above goes in the main of the trigger zone.

;Artificial Intelligence Script
;Header
desc = Default Entity Behaviour (Nothing)
;Triggers
:state=0:state=1
:state=1,activated=1:runfpidefault=2
:state=1,activated=2:runfpidefault=3
;End of Script

The above goes in the Appear of an object used as a detonator.

;Artificial Intelligence Script
;Header
desc = Instant Off
;Triggers
:state=0:activateifused=2,destroy
;End of Script

The above goes into the Destroy of the rock I want to make go away. Of course I've changed all the necessary parameters of each entity exactly according to the guide.

When I test the level, I can hear the rock blow up immediately and it's gone when I check and I'm not even close to the trigger. This happens every time with whatever script I use. I've tried modifying other scripts to accomplish the same thing when I kill an entity also. Same thing....entity dissapeers immediately upon entering the level so I know I'm doing something wrong.
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 3rd Aug 2009 02:33
Also, you might want to check to see if the "Explodable" option in the entity properties is set to "Yes".

3dMan
15
Years of Service
User Offline
Joined: 2nd Aug 2009
Location:
Posted: 3rd Aug 2009 04:10
It IS set to explodable. I've now tried 4 additional scripts and research....nothing happens. Another 10 hours of frustration. C++ was much easier to learn than this scripting language in my opinion. I just don't get it.
3dMan
15
Years of Service
User Offline
Joined: 2nd Aug 2009
Location:
Posted: 3rd Aug 2009 09:48
Alright....ANOTHER week completely wasted on trying to get just one single script to work. I have read the entire community guide and many other guides on how to make things work with scripts and tried MANY scripts "exactly" as printed. Nothing is working for me and my frustration level is through the roof!! I don't seem to be getting any help or support and my wife is ready to throw me out because of all my yelling at the screen.

Sorry for the rant but I've been working on this for two weeks now sometimes for over 14 hours a day and I cannot figure out this scripting stuff. I can't even get something as simple as walking over a trigger zone and something else simply vanishes to work.

I think it's time to look into another gaming application like Realm Crafter or something because there seems to be no way to learn FPSC scripting without a detailed tutorial.

Thanks to all who replied to my crys for help.
Butt monkey
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location: Scotland
Posted: 4th Aug 2009 16:56
Just spawn the rock and give it a "spawn life" of however many seconds you want it to remain, then it will disappear.

The rock must be dynamic by the way.
zeza
16
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 4th Aug 2009 18:56
try setting the triggerzone's main to this


Then give your rock this


Or if you have 1.15 you can try this



Make sure to set the ifused in the triggerzone to the rock
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 6th Aug 2009 03:51
Quote: "


The above goes in the main of the trigger zone.



The above goes in the Appear of an object used as a detonator.


"

The code you say goes in the Main section actually goes in the Appear section.

zeza's scripts should work as well.

Login to post a reply

Server time is: 2024-11-25 05:16:18
Your offset time is: 2024-11-25 05:16:18