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 / Is it possible to carry two weapons in arena mode at start up?

Author
Message
Soviet176
15
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 26th Oct 2010 22:36
Sorry for the long title, I was just wondering if there was a way to script in the .FPI of a character to have two weapons (pistol, knife) during start up instead of having them find the weapons in the map?

Putting fear back into sliced bread since 4th May 2010
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 26th Oct 2010 22:42 Edited at: 26th Oct 2010 22:43
I'm not that familiar with arena mode, but you can set the player start with one weapon - say the knife - and then place the other weapon beneath the player start thingy. He will automatically pick it up at start of level.

BTW, don't worry about the length of the title. The mods will give you kudos for that.

I reject your reality and substitute my own!

Add more adventure to your game -- use RPG Mod
Soviet176
15
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 26th Oct 2010 22:46
I was actually going to do that, the only problem is, when the player dies in arena mode, he loses all the guns he has except the gun that was set to him. So then they would have to go all the way around the map just to find their knifes.

Instead, I wanted to do something like soldier front or combat arms, where they have their main gun and their melee for backup. How would you do it in Single-player? maybe it will work with arena.

Putting fear back into sliced bread since 4th May 2010
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 26th Oct 2010 22:50 Edited at: 26th Oct 2010 22:51
Hmmmm? That was a piece of info you didn't state at first. That is a little more complex and it may not be easily done. I'll think about it but hopefully somebody else can come up with a solution.

Edit:

Oh, how many lives are you giving the player or is it unlimited?

I reject your reality and substitute my own!

Add more adventure to your game -- use RPG Mod
Soviet176
15
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 26th Oct 2010 22:51
Quote: " That was a piece of info you didn't state at first."


Sorry about that comrade. I thought there was a way to set guns the player can have in their .FPI or something. I was just going to put that in for the characters main script. And then switch it to arena mode.

Putting fear back into sliced bread since 4th May 2010
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 26th Oct 2010 23:09 Edited at: 26th Oct 2010 23:10
You can't add a weapon through scripting using the stock engine. However, you can mod it into your Mystic Mod (I guess I'm assuming that you authored that mod). I have a command to add a weapon in RPG Mod but that won't help you.

I was thinking if you had a certain amount of lives - say three - you can set a variable for each life. However, I'm not sure how you can set it to true before the player dies as there isn't any command that checks the player's health. At least I don't think there is. Anyway you can place the number of knives at player start and turn spawning off on all but one. Then if the variable is set to spawn a weapon, you can do that in the starting script. It makes sense but it may not work or it may need some trial and error to do.

I reject your reality and substitute my own!

Add more adventure to your game -- use RPG Mod
Soviet176
15
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 26th Oct 2010 23:42
Quote: "I guess I'm assuming that you authored that mod"


I wish I was, budokaiman is the authored modder of mystic mod. Right now I am testing out FPSC x9, just wanted to see if this was possible. It almost sounds so easy, in the .FPI of the character it says "hasweapon" which makes it possible to set only one weapon during start up. But I find it interesting that you cant add another one some how like "hasweapon2" or something.

Putting fear back into sliced bread since 4th May 2010
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 27th Oct 2010 01:03
Calling Conjured Entertainment, calling Conjured Entertainment.

He is the world's greatest work-a-round artist with FPSC stock engine. I'm going to test my feeble plan and see what happens. I need to take a break from making some more modified code to RPG Mod anyway.

I reject your reality and substitute my own!

Add more adventure to your game -- use RPG Mod
Soviet176
15
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 27th Oct 2010 01:12
lol yea he is, awesome thank you very much Flatlander. I will keep fiddling and see what I can come up with.

Putting fear back into sliced bread since 4th May 2010
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 27th Oct 2010 01:43 Edited at: 27th Oct 2010 01:52
Arena is evidently different from single player mode. Is arena actually a multi-player game?

Anyway, I did a build with the player having the automatic defined in the player start and a knife (actually a dagger) place underneath player start. So, he actually started with two weapons. I let the player die and it came back to the player start position and I still had both weapons.

I should have realized that would be the case because I remember in the code that when the player dies he retains all his weapons upon restart. However, this must not be the case with an arena mode if it doesn't work for you. I haven't seen CE talk much about doing scripting for the arena mode.

Sorry, but I don't see a problem -- at least with the regular mode.

Addendum:

If I remember right it seems that not everything that works with single player works with arena. This might be one of those things.

I reject your reality and substitute my own!

Add more adventure to your game -- use RPG Mod
Soviet176
15
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 27th Oct 2010 03:42
Quote: "If I remember right it seems that not everything that works with single player works with arena. This might be one of those things."


Yea you are right. This kinda sucks, thanks for helping me though flatlander, maybe CE will come in later and know a work around.

Putting fear back into sliced bread since 4th May 2010
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 27th Oct 2010 19:20 Edited at: 27th Oct 2010 19:23
Quote: "I was actually going to do that, the only problem is, when the player dies in arena mode, he loses all the guns he has except the gun that was set to him. So then they would have to go all the way around the map just to find their knifes. "


...assign this script to any weapons that you want your players to have instantly, whenever they start the level or respawn:



This script was intended for single player use, and you may need to tweak some portions of the code, or weapon pickup model properties, to suit your needs.

Attachments

Login to view attachments
Soviet176
15
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 27th Oct 2010 22:44
Thank you so much Seth black! it works perfectly

Putting fear back into sliced bread since 4th May 2010

Login to post a reply

Server time is: 2024-11-24 16:57:23
Your offset time is: 2024-11-24 16:57:23