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 / Two pairs of entities set up axactly the same way, but only one pair works :S

Author
Message
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 17th May 2011 20:19
I have two remote doors set up to be activated by two zombies being killed, one for each door. The doors are named differently and use the same script. The zombies use the same script and are set up to activate their respective doors.

The problem is only one zombie/remote door pair actually works

I've checked, double checked and checked again, but both pairs are set up exactly as they should be, with one zombie set up to activate one door when it dies, and the other zombie set up to activate the other door when it dies. But no matter what I do, only one pair works as it should.

I'm using fpsc 1.18.16, the problem has been occuring right from beta 12 (I think) through to beta 16, I'm really puzzled by this as all the other scripts I use work fine, it's just this one pair of entities that don't work as they should.

Any ideas?

bobochobo
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 17th May 2011 22:03
If you posted the script we might be able to check it for you.

All browsers should come with compulsory spell checks.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 17th May 2011 22:33 Edited at: 17th May 2011 22:33
Ok, I didn't post the script because it works with one pair, so I was wondering if it was anything to do with the entity set up?

Anyway, if it will help, I'll post the scripts anyway...

Here's the remote door script;



And here's the zombie script;



Scientist101
14
Years of Service
User Offline
Joined: 31st Mar 2010
Location: Laboratory
Posted: 17th May 2011 23:40
If I were to make a guess off the top of my head from reading your scripts, it does work, but you cannot use the same "activateifused=1/activated=1" for both sets.

Did you try "activateifused=1/activated=1" for one set (door and zombie), and "activateifused=2/activated=2" for the second set (door and zombie)?
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 18th May 2011 02:44
Quote: "Did you try "activateifused=1/activated=1" for one set (door and zombie), and "activateifused=2/activated=2" for the second set (door and zombie)? "


No, I didn't think I needed to because I gave the two doors different names and the 'if used' in each zombie pointed to a different door

Scientist101
14
Years of Service
User Offline
Joined: 31st Mar 2010
Location: Laboratory
Posted: 18th May 2011 05:22
Quote: "No, I didn't think I needed to because I gave the two doors different names and the 'if used' in each zombie pointed to a different door"


That was my second question, but it seems you are on top of it already.
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 18th May 2011 05:49
Quote: "it seems you are on top of it"


I wish lol. Inspite of having the scripts and entities set up correctly, I can still only get one of the pairs to work correctly!

Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 18th May 2011 08:03
Could you post some shots of how you have set up the doors and zombies in the editor?

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 18th May 2011 18:20 Edited at: 18th May 2011 18:25
Ok, the 1st two pictures show the 1st zombie and door pair, the 2nd two pictures show the 2nd zombie and door pair.









Hope these shots help

[edit]The scripts in the entity screens are the scripts in the code snippets a couple of posts back...[/edit]

[2ndedit]The zombies are spawned by other scripts as part of my 'cascading explosions' sequence which still works as it should[/2ndedit]

Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 19th May 2011 10:45
Hey bruce3371,

this is a toughy - i replicated your set up this morning and it worked on my machine. I used the stock doorremote.fpi instead of your custom door script, i also had activateifused=1 on the same line as state=0 in your zombie destroy script.

There may be something else setting the door's activation level in your level?

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 19th May 2011 16:19
The puzzling thing is that I can get it to work in a test level as well, just not in my game level.

The only thing I can think of that might be causing it is that the game level is quite old (1st built with 1.17) and I'm using 1.18 beta 16 now. I only really noticed the problem after I installed beta 14 I think.

I'm starting to think that a complete rebuild of that level is needed, to get it all in line with the latest beta

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 21st May 2011 05:33
I don't know if this makes any sense. Sometimes I can see things in my head and sometimes I have to have them written down and study them for hours. Anyway, you say they both use the same script. Could it be that when the script is called the second time, it has already completed (is at state=2) and does not start from the beginning?

Brian.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st May 2011 16:14
I understand what you're saying, but each entity's 'if used' points to a different remote door, so although they use the same script, they're not activating the same remote door.

The other thing is, they are on near enough opposite sides of the level, so they're not being activated simultaniously.

Hope that makes sense

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 21st May 2011 17:26 Edited at: 21st May 2011 17:27
That's not what I meant. If they are using the same script, when the trigger calls the script for the second time, it has already progressed to the end of the script. It doesn't start all over again. Is that possible?

Have you tried renaming a second copy of the script so that the are not using the same script?

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st May 2011 17:48
Quote: "when the trigger calls the script for the second time"


It's not the same trigger that's calling it twice, it's 2 different entities calling it on 2 seperate occasions.

Here's how it's supposed to work;

Zombie one is killed, activating remote door 1, then, later on in the level, zombie 2 is killed, activating remote door 2. The 2 zombies just happen to use the same destroy script to achieve this. But the 2nd zombie fails to activate its corresponding remote door.

My earlier post showing screenshots of the zombie and remote door set ups, shows what's supposed to happen more clearly.

I have similar set ups in other levels, where different character entities being killed, will activate different remote doors. It works fine everywhere else I use this method, but for some reason, it doesn't work properly in this one level.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 21st May 2011 18:22
Quote: "It's not the same trigger that's calling it twice, it's 2 different entities calling it on 2 seperate occasions."


Yeah, again, I understand that, but it's using the same script, which has already run to it's end. I can think of no other way to explain myself so I am only left repeating the same question....

Quote: "Have you tried renaming a second copy of the script so that the are not using the same script?"


bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st May 2011 18:43
Why would I need to rename the 2nd script, when like I've already said, the exact same set up works perfectly well on other game levels?

If what you're saying is true about each entity needing to use a different script, to trigger another entity, why then, do 6 other pairs of entities/doors, all using the same script, work perfectly well?

When activating different doors with different entities, the only thing that needs changing is the 'if used' in the entity's set up screen.

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 21st May 2011 19:01
Double post (sorry).

Here is an fpm attached, with the scripts I'm using in their proper places in the scriptbank, to illustrate what I'm trying to achieve, and to prove that it works in a test level, using the same script for each pair of entities.

My problem is, that I can get it to work perfectly in a test map, but not in my game level;

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-24 09:03:03
Your offset time is: 2024-11-24 09:03:03