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 / Drop, pick up, switch(exchange) weapons(without removing) in one script for 2 slots

Author
Message
Cuando
10
Years of Service
User Offline
Joined: 5th Dec 2013
Location:
Posted: 5th Dec 2013 21:43
Hello.
I have one problem like in the subject.
I would like to do to be able to use only two weapons:
I know: use this:
for trigger zone(2 weapons).
My idea is:
- The ability to picking up and drop weapons (without deleting them from the map)
- Switching the weapon to the one that is on the floor (without deleting it)
- Works only on 2 weapons slots
I have a problem because on the forum I just find only each of these points and I can not combine with each other.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 6th Dec 2013 18:58
Hi cuando, and welcome.
Take a look at this thread..http://forum.thegamecreators.com/?m=forum_view&t=186330&b=23
It may help you out. The drop weapon and pickup has always been glitch, but works for the most part. Try playing with the script
and see what you come up with
best luck

You know you're a bad gamer when you're able to run out of infinite lives.
Cuando
10
Years of Service
User Offline
Joined: 5th Dec 2013
Location:
Posted: 7th Dec 2013 21:42
Can anybody tell me what`s wrong ?
I try to scripting, I`m new, and i want to learn, until i`m wrote this:

Now, when I press F, my player picked up weapon and in the same time he dropped it. I now that between this 2 function in script is an error but I'm not good in this and i don't know what. I'm just know that something is missing. Very please help. Sorry for my English but gretting from Poland.
Pirate Myke
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 8th Dec 2013 14:58
Start by changing this line of code and see if it helps.
Just some syntax errors.



Hope that helps.

Snake675
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Planet Earth
Posted: 9th Dec 2013 05:16
Hi

Solved. There where two issues:
1. The manual says about PLAYERTAKE: "The entity’s main script will continue to run if the entity is defined as Always Active"
2. After waiting for a key beeing pressed, its best to wait for it to be released

Here is the modified code that works:


Greetings, Snake67

------------------------------------------------------------
i5 2.8 GHz 64bit / 4G ram / W7 home sp1 / geforce gts 250
FPSC 120 Beta 3
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 9th Dec 2013 16:38
Very nice Snake675, I think you got it.
Yes I always like using "keypressed=" instead of "scanecodekeypressed=". Seems to work better in these
situations.
best

You know you're a bad gamer when you're able to run out of infinite lives.
Snake675
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 6th Apr 2012
Location: Planet Earth
Posted: 9th Dec 2013 18:22 Edited at: 9th Dec 2013 18:23
When testing did go on, i recognized a strange thing about this script. After the weapon got droped once, it can't be picked up anymore...

------------------------------------------------------------
i5 2.8 GHz 64bit / 4G ram / W7 home sp1 / geforce gts 250
FPSC 120 Beta 3
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 13th Dec 2013 20:59
@ Snake675
Yes, I noticed that also. I did have some time
to play with this a bit. May have got it down. Attached
is a quick map & script to test out. All stock. Anyone
let me know if it works for you. Player starts with one
weapon, so the first one "picked up" is what is dropped next,
and so on. Carefully look at all my weapon settings. I cycled
many times without a hitch.

You know you're a bad gamer when you're able to run out of infinite lives.

Attachments

Login to view attachments
Cuando
10
Years of Service
User Offline
Joined: 5th Dec 2013
Location:
Posted: 29th Dec 2013 01:10
Thanks all of you.
I really helped.
Thanks again and greetings.

Login to post a reply

Server time is: 2024-04-19 08:27:25
Your offset time is: 2024-04-19 08:27:25