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 / Make Player Drop all weapons after winning level and before next level

Author
Message
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Jun 2008 05:12 Edited at: 16th Sep 2008 06:52
You first need to write a script that will pick up the weapon. It is based on the "weapon.fpi." However, within that script you need to also indicate when it will be dropped. We will use a trigger or win zone to activate the ifused parameter. Here is the script for picking up each weapon that will be dropped.



For each weapon we need to add this script and also we need to change the "always active" parameter of the weapon. See images below:






Each weapon should also have the same name. "Weapon" would be a good name to use.

The zone where we end (win) the level should have the name of the weapons in the "ifused" parameter. We should also have the fpi file, "plrinzoneactivateused.fpi" as the main AI. If it is a win zone or trigger zone make sure that the Objectives value is correct so that the level ends correctly.

The weapons will be dropped and the player in the next level will not have any weapons to start out with.

We are now!

The download is a zip file that contains my example maps and scripts. If it is unzipped in the root folder of FPSC and making sure "Use folder names" is checked they should all be placed in the correct sub-folders. When building you can load up the "test.fpg."

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC

Attachments

Login to view attachments
Slayer222
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: Wherever I feel like
Posted: 16th Jun 2008 06:24
Sweet stuff here!

[img]
[/img] Official Airmod fanboy. Member of the Airlside fan club
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 16th Jun 2008 07:30
Of course, we can modify it so that only a few of the weapons are dropped and the player will keep one or more of the weapons but not all.

** 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 13:38
BTW, if you use my examples and scripts -- in the first level you will need to pickup 3 gold bars so that the door will open. Once the door opens and you enter, the weapons you picked up will be dropped and and then the next level will start -- that is if you build the game "test", all the scripts are in the right place and you run the game from the "MyGames\test" folder by clicking on "test.exe."

** We are not Alone **
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 21st Jun 2008 10:22
I don't care if there are any responses. I'm just surprised there haven't been more views of this post. This is was something I thought a lot of people would be interested in as I've seen it brought up quite a few times before it was even possible. Maybe it's the subject and people are thinking I am asking how to do it?

Anyway the purpose of this post is to bump it up.

** We are not Alone **
Opposing force
19
Years of Service
User Offline
Joined: 10th Aug 2005
Location: England
Posted: 21st Jun 2008 14:02
Wow, thanks F l a t l a n d e r, this will be really useful. I'll try it out later.

http://www.freewebs.com/teammegabasic/
For low price FPSC and Dark BASIC media packs.
Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 22nd Jun 2008 00:04 Edited at: 22nd Jun 2008 00:05
The forums can be very unpredictable sometimes.

You go away and spend a bunch of time addressing something numerous people have asked for then find very few people respond.

Meanwhile relatively uninspired threads will generate 50+ posts which don't really amount to anything.

The trick is to do something for yourself first and give a tech demo of it to show people the benefit of having that feature in your game. Then people will come asking and give you feedback at the same time.

I'd like to use the player drop functionality but so the player can only pickup / hold 1 weapon at a time and has to drop the weapon their holding before picking up another or current weapon is automatically dropped when new one picked up. Would you be able to tell me how to do this?

Thanks and nice contribution. Don't let the lack of posts make you feel under valued. There's only a handful of forum members that can guarantee 50+ posts everytime they start a new thread. I think people are starting to realise those people aren't around anymore and will come to be more appreciative of the likes of you and I.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 25th Jun 2008 06:04
Nomad, I've been working on that concept. I can't seem to get it working yet though. I am currently preoccupied with other projects right now but will get back to that. I'm not sure if Conjured is interested in this or not.

** We are not Alone **
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Jun 2008 06:25 Edited at: 28th Jun 2008 07:25
The two main issues with the "playerdrop" command are:

1) Weapons the player starts a level with
and
2) Weapons the player gets from enemies

Both scenarios involve weapons that cannot be dropped because the weapons do not have a script.

It's very sad, and what I would love to see is Lee revamp the weapon system and have it scripted. So the scripts actually tell the weapons:

- If the player is moving, animate for movement
- If the player is not moving, animate for idle
- If the player leftclicks, then animate firing and hurt whatever we're pointing at.

Then we would have a LOT more options with weaponry, especially in terms of:

- If the player rightclicks, turn on a flashlight... activate a certain variable... shoot a grenade... whatever!
- If the player presses "G" then drop their current weapon.

[EDIT: Had two sigs ]


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 28th Jun 2008 01:27
You play Counter-Strike, don't you, Ply. Also, PLRDROP does not seem to work in this update. To add, I tried using the plrdrop with the minigun, it dropped the minigun, but the player still had the weapon.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Jun 2008 07:25
Well, for starters, it isn't "plrdrop". It is "PLAYERDROP". Gotta spell out "player" for it to work.

Next up, I don't trust the plrdrop command. I hate the way it's been implemented and could have been done in a much more dynamic way.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Changes
17
Years of Service
User Offline
Joined: 7th May 2007
Location: Scotland
Posted: 29th Jun 2008 11:25
Quote: "- If the player leftclicks, then animate firing and hurt whatever we're pointing at."


This isnt a verry good method of damaging the enemy and unrealistic. Why not create an engine entity/variable called Bullet? so for different weapons such as 9mm the bullet variables for the weapon can be changed in the weapon script?

jamie
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 29th Jun 2008 11:38
Well yes, we'll add that in too.....

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Jun 2008 01:33
@Changes:

It's a rough idea. That certainly would not be how the final outcome would function.

My point was that if it WAS done that way, YOU would be able to change it if you wanted to instead of being stuck with whatever Lee thought you needed.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
JunckMAn
16
Years of Service
User Offline
Joined: 23rd Apr 2008
Location: JunckLAnd
Posted: 30th Jun 2008 11:09
Hey Flatlander. damn great work. some cool guys from here told me thet it is impossible. huh, what do they say now!!

And u didnt believe i was russian
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Jun 2008 11:25
@JunckMAn:

That all depends upon the date they told you that. This was a recent addition to FPSC that made it possible.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.

Login to post a reply

Server time is: 2024-11-24 10:43:49
Your offset time is: 2024-11-24 10:43:49