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 / PLR Drop! Fixed?!

Author
Message
Shadow Blade
18
Years of Service
User Offline
Joined: 31st Oct 2006
Location: United Kingdom
Posted: 14th Jun 2008 15:03
Quote: "* Now 'always active' items collected with PLAYERTAKE keep their scripts running
* Above fix allows the PLAYERDROP FPI action to function properly
* Added new script PICKUPSLIPPY.FPI which randomly drops what has been collected"


From the beta update, is it really fixed? And if so how exactly do we use it?

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 14th Jun 2008 17:10
Quote: "PLR Drop! Fixed?! "


Nope, but PLAYERDROP is......

Shadow Blade
18
Years of Service
User Offline
Joined: 31st Oct 2006
Location: United Kingdom
Posted: 14th Jun 2008 17:18
samething

John Perone
18
Years of Service
User Offline
Joined: 1st Aug 2006
Location:
Posted: 14th Jun 2008 17:39
It's not the same because PLRdrop won't work. LOL

If their scripts continue to run when set to always active, then playerdrop would be used the same as playertake. Create a condition in the script where, when met, the player will drop the item.

For example...



JP.

JP
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 14th Jun 2008 19:12
Lol, I know, but if you put PLRDROP in a script, it still wouldn't work......

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 15th Jun 2008 00:09
Okay, time to be the supreme pessimist.


What if I want to drop the weapon that I start with? (The weapon given in the Player's Start Marker)

What if I want to drop a weapon that I picked up in the LAST level? (Meaning it doesn't HAVE a running script)



Solve those and I'll be satisfied with the command.


The one and only,


John Perone
18
Years of Service
User Offline
Joined: 1st Aug 2006
Location:
Posted: 15th Jun 2008 03:02
Doesn't playerdrop work for any inventory (pickup) item, and not just weapons? It is a bit limited but should still be useful for gameplay.

JP
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 15th Jun 2008 07:29
Has anyone tested this? I just did and spent about an hour trying to get it to work. No luck. I used Lee's new script called "pickupslippy.fpi" I first used it on a gold bar -- never dropped. I kept cutting the random number back until I got to 2 and still would not drop. I tried it on weapons and several other entities both stock and custom. Nothing. I tried using a script suggested by John and used a "scancodekeypressed" with different keys as well as the one in his script. For those interested here is Lee's test script.



** We are not Alone **
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 15th Jun 2008 10:37
Hehehe, looks like it isn't such a godsend after all......

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 15th Jun 2008 23:51
Well, once you DO get it working, try to do this as well:

- Make a script so that weapons can be dropped by pressing the "G" key. Only drop the weapon that the player is currently holding.

Sounds easy enough, right? You check for "scancodekeypressed=34" and just drop the weapon! Hmmmm, but what about all the OTHER weapons you picked up that use that very same script? You know, I bet all of them would drop.


Does anyone remember the thread I made about "What if PLRDROP worked?"... I didn't type that thread for my health, you know.


The one and only,


Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Jun 2008 02:43
I haven't heard back from Lee yet but I had sent him an email regarding this about 6 or 8 hours ago. So may not hear from for awhile anyway.

** We are not Alone **
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Jun 2008 04:11
Heard back from Lee. I feel kind of stupid because I just knew it had something to do with setting the "Always Active" parameter to "yes." I thought I had tried that but I must have gotten messed up and confused.

** We are not Alone **
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 16th Jun 2008 06:31
@FL:

So you got it working then?

Have you tried any of the suggestions I have made?


The one and only,


Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Jun 2008 07:28
Yes, it is working. I created a thread here where the player will drop all of the weapons before going to the next level. At the next level the player will no longer have any weapons (he won't have the weapons he picked up in the previous level). This is how I see the main use of this command to be.

If the same playertake/playerdrop script is used on all of the weapons and you use a scancodekeypressed then you are right all of the weapons will be dropped. I tried it on four weapons. They all were huddled together in one spot. Although it works I believe there is an issue with playerdrop. The dropped entity is not on the ground but is floating in the air. This does not matter if you are making the player drop all of the weapons just before going to the next level if you want the player not to have any weapons in the next level. This can be modified.

** We are not Alone **
Shadow Blade
18
Years of Service
User Offline
Joined: 31st Oct 2006
Location: United Kingdom
Posted: 16th Jun 2008 18:34
Cool, this would mean we could have only 1 weapon, change when the other is picked up. Does it actually recreate the gun on the floor?

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Jun 2008 22:00 Edited at: 16th Jun 2008 22:01
Shadow Blade, yes, the weapon is recreated but not on the floor. It seems that when the entity is dropped it is floating in the air and not on the ground (floor). It's not very high off the ground but it is noticeable. The entity or weapon does not have to be recreated. In the playertake/playerdrop script you would use the destroy command on the next line if you don't want it to be recreated:

:state=10:playerdrop
:state=11:destroy

When playerdrop is executed it automatically increments the state by one.

-----------------------------

Quote: "this would mean we could have only 1 weapon, change when the other is picked up"


I believe it can be scripted to do that but it will require some thinking as to what kind of algorithm we will need to do it. It seems that it should be simple to do but it's not.

** We are not Alone **
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 16th Jun 2008 22:56
@FL:

To swap out a single weapon (Meaning you can only have a single weapon at a time), then you could do something like this:

To pickup weapon, check if a variable is set to 0.
If it is, then pick up the weapon and set the variable to something other than 0 (To prevent other weapons being picked up)
If weapon is not picked up and variable is not 0, display the "PRESS G TO SWAP" hud.
If G is pressed, then drop your weapon and set the variable to 0. (To allow the player to pickup a weapon)


Tada!!


The one and only,


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 16th Jun 2008 23:06 Edited at: 16th Jun 2008 23:09
Okay, 2 minutes wasn't much, here's my concept for the idea:




That oughta do it. I didn't put in any HUDs for this, but I put in comments to help you out with that.


[EDIT]
Unfortunately, even though this will work, I would not suggest making enemies drop weapons, because the player will be able to pick those up and have more than one weapon.

Those are also weapons that the player may not be able to drop.
[/EDIT]


The one and only,


Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Jun 2008 23:06 Edited at: 17th Jun 2008 08:07
Totally Edited:

Yes, variables definitely have to be involved. I am going to continually work on an algorithm that would automatically swap weapons without having to press a key.

Aaaaaccckkk -That two minutes took away from the 15 minutes you were going to give to something else.

Addendum:

I need to do some other things before I can get back to this. Hopefully in a couple of days.

** We are not Alone **

Login to post a reply

Server time is: 2024-11-24 09:38:45
Your offset time is: 2024-11-24 09:38:45