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 Classes possible?

Author
Message
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 8th Nov 2007 20:16
I got an idea but I dont know if it works.
Its a script that shows a hud when entering a triggerzone.
The HUD looks like the one I have made in paint
The player are able to choose a class, if the player press 1. he/she will get an m16/m203 an M9 and grenade + knife or if he/she wants to play like a sniper he/she just push 3 and gets the sniper rifle and nothing more.

Is this able? Will anyone do it?
If someone is going to make a script like this (if it works) I could make some HUds for it.

Visit our new website! www.bigvikinggames.tk !New Forum is up!
New website for Silent Depths. www.freewebs.com/silent-depths

Attachments

Login to view attachments
game lover
17
Years of Service
User Offline
Joined: 27th Apr 2007
Location:
Posted: 8th Nov 2007 20:53
Actually this is probably possible .... it would take a while but I will give it a go.

We all want to be awesome, but does awesome want to be us?
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 8th Nov 2007 21:19
Sound interesting...

"he is coming!..." - WIP in 'Showcase'
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 8th Nov 2007 21:24 Edited at: 8th Nov 2007 21:33
I think you could do something as simple as opening a door with those weapons behind it. Which door opens depends on which key you press.

Best.

EDIT: Which brings up another idea: Transporters where you pick the destination by pressing it's number. (perhaps a sign with the possible destinations) Then use the plrmoveto command to send the player to that location.

I'm sorry, my answers are limited. You must ask the right question.

Squelchy Tom
18
Years of Service
User Offline
Joined: 25th Aug 2006
Location:
Posted: 8th Nov 2007 21:38
Tried this in MP, had the classes spawn in different rooms with a drop to the arena (So others couldent get up) The weapons were on the table in the spawn room.

Of course a script would be lovely. 6 extra rooms just to do a class job is horrible for framerate.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 8th Nov 2007 21:40 Edited at: 8th Nov 2007 22:38
Quote: "I think you could do something as simple as opening a door with those waepons behind it. Which door opens depends on which key you press."

Good idea.

IF the doors are all named the same THEN
Each door has a different script for the three activated states.

Just put the name of the doors in the IFUSED of the entity or trigger that is running your main script.

Have the main script do a ...

:state=0:state=1
:state=1,scancodekeypressed=2:activateifused = 2,state=2
:state=1,scancodekeypressed=3:activateifused = 3,state=2
:state=1,scancodekeypressed=4:activateifused = 4,state=2

Then each door script would do a ...

:activated=2:state=2

or
:activated=3:state=2

or
:activated=4:state=2

...depending on which door it is. (Thats why you need 3 scripts, so the other doors do nothing in that activated state)

State=2, and so on, of the door scripts would do the open the door actions.

Quote: "6 extra rooms just to do a class job is horrible for framerate."

They do not have to be that big of a room.
Think of them more as three (3 for his needs) lockers.

You could try to move the entities from a single unaccessible room to the location the player is at (trigger), but I like the door idea.

Here is a modified DOORUSE script for Door #1


Here is a modified DOORUSE script for Door #2


Here is a modified DOORUSE script for Door #3


I tried them out, and it works great.
Here is the script for your triggerzone's AIMAIN...



Of course you will need to specify the correct path to your image and not the lockeddoor one used in my example.
Don't forget to name the doors all the same name and put that name in the IFUSED of the TriggerZone Marker.

Have Fun

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Nov 2007 00:42
Dang, I didn't even have a chance to come and solve this one, lol. Everything got done in less than 2 hours!!!

Nice work on those scripts Conjured.


The one and only,
~PlystirE~

NBKgames
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location:
Posted: 9th Nov 2007 03:38
Wow this looks pretty neat

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 9th Nov 2007 14:04
The idea with the doors works but it is not as cool as a screen were you choose your things and then start your mission.
Open the door with the rigth class feels to simple.

Visit our new website! www.bigvikinggames.tk !New Forum is up!
New website for Silent Depths. www.freewebs.com/silent-depths
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 10th Nov 2007 03:03
Well, it seems like you got the whole bit about the triggerzone figured out.

Try this on for size:

Put all the weapons right on top of where the player starts. Name them ALL the same thing.

Put that name into the If Used field of the triggerzone (Which is also right on top of the player). And give the triggerzone this script:



You'll also want to have a HUD loaded and displayed in that script, but I'll leave that up to you.

Now, make this script:



Save that as something like "appear_act1.fpi" and now ALTER it so that the "activated=1" in the first line is: "activated=2". And save that as a different script. Do the same for "activated=3" and save that as well.

Now... for all the weapons that you want to spawn when the player pressed "1", give them the "appear_act1.fpi" script as their "Spawn AI". Give the weapons to be picked up when the player presses "2" the "appear_act2.fpi" as THEIR spawn AI script. Likewise with the weapons for pressing "3".

That oughta do it for ya.

If any problems arise, post em here, and when I get a chance, I'll look at it.


The one and only,
~PlystirE~

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 10th Nov 2007 11:23
Thanks, I will try it out later today, but is the player able to press all numbers to get all wepaons or is it onetime happening? So when the player press 1 no other things will spwan when pressing 2?

Visit our new website! www.bigvikinggames.tk !New Forum is up!
New website for Silent Depths. www.freewebs.com/silent-depths
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 12th Nov 2007 19:17
I found a problem, when I get into the truggerzone it automaticly gives me all weapons that got appear_act1.fpi in their spawn script.
Do you know whats the problem?

Visit our new website! www.bigvikinggames.tk !New Forum is up!
New website for Silent Depths. www.freewebs.com/silent-depths
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 13th Nov 2007 01:54 Edited at: 13th Nov 2007 01:55
I initially had that problem, too.

Since you're OBVIOUSLY not using my Mod, you're going to need to change the "keypressed=" to "scancodekeypressed=" or whatever it's called in v1.07

Sorry, I should have mentioned that, lol.

[EDIT]
About your initial questions, it IS a one time thing. Notice in the script that it activates itSELF after it senses a keypressed. That will:
1) Make it stop moving the player back onto the triggerzone, effectively locking them in place.
2) Prevent it from sensing any more keypresses.
[/EDIT]


The one and only,
~PlystirE~

dfujis the rocker
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location:
Posted: 13th Nov 2007 04:57
sounds more like a dbp project, could you use this to select specific weapons like cs? or is that too complex?

famous last words: check this out
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 13th Nov 2007 07:35
Well, if you put all the weapons you want them to choose from in a list from 0-9 and show the player a HUD that will tell them what number goes to what weapon... then alter my script a tad, and edit in the correct weapons... correctly, then I don't see how you couldn't.

My script should be easy enough to understand (assuming you've read through and understood my tutorials), and therefore, easy enough to alter for any number of weapons that you are willing to give a keyboard key to. Heck! You could have the user push Tab for a weapon if you just change the value of the key the script is looking for.


The one and only,
~PlystirE~

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 13th Nov 2007 17:57
Thank you! You are the best
What should I add to show a HUD?

Visit our new website! www.bigvikinggames.tk !New Forum is up!
New website for Silent Depths. www.freewebs.com/silent-depths
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 14th Nov 2007 03:45
Hmmmm, well you can assimilate part of "Tutorial #2" in my Scripting Tuts guide. In that one it talks about loading a HUD and displaying it.


The one and only,
~PlystirE~

Slayer222
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: Wherever I feel like
Posted: 15th Nov 2007 02:52
So the script displays a HUD, spawns an entity according to what the player selects, removes the HUD and then ends the script right? That would be the best thing to do IMO. Then name the entity's to be spawned gun1, gun2 or gun3 according to class.
*Slayer_2

EOT
[img][/img]
Check it out here: http://eliteops.piczo.com/?cr=6&rfm=y
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 15th Nov 2007 04:32
Yes, thank you for rephrasing my words, Slayer.

That's exactly how it works.


The one and only,
~PlystirE~

Dr Parsnips
17
Years of Service
User Offline
Joined: 14th Jul 2007
Location: London
Posted: 15th Nov 2007 13:46
all i have to say is......nice.....

HMMMMMMM
Slayer222
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: Wherever I feel like
Posted: 15th Nov 2007 16:21
Doesn't work. Meh, maybe I screwed up.

EOT
[img][/img]
Check it out here: http://eliteops.piczo.com/?cr=6&rfm=y
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 17th Nov 2007 06:44
Simply saying "It doesn't work" won't help others understand what's going wrong for you. Provide a detailed description of what's happening that's undesirable, so that maybe we can help.


The one and only,
~PlystirE~

Your signature has been erased by a mod
Squelchy Tom
18
Years of Service
User Offline
Joined: 25th Aug 2006
Location:
Posted: 22nd Nov 2007 17:17
Can you use triggerzones in MP? This could be useful.
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 24th Nov 2007 20:51
Quote: "Can you use triggerzones in MP? "


Hmmm... That is a good question, I thought dynamic entities all were nulled in MP.

Shim Kangrey
17
Years of Service
User Offline
Joined: 4th Feb 2007
Location: Upon Your Shadows
Posted: 25th Nov 2007 20:50
You're right, coffee grunt, dynamic entities (except guns and I think health) are automatically static in MP.

Wow, FPSC can do more than I thought...

The world is like an onion, there's disappointment in every slice.

Projects:
fallen one
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: My imagination!
Posted: 26th Nov 2007 09:36
would be nice if they had different properties as well, like health, armour, speed of movement etc.

fpsc game KillTV update 22Oct.http://www.avantivita.com/killtv.html
i need help
18
Years of Service
User Offline
Joined: 20th Nov 2006
Location:
Posted: 12th Mar 2008 21:33
do you think you could put the part to bring up the HUD in the script and put "HUD NAME HERE" or something so people who can't script (like me) can use it sorry if its to much to ask i just think some people may benifit
Kerrby
16
Years of Service
User Offline
Joined: 14th Mar 2008
Location: Australia mate.
Posted: 18th Mar 2008 07:27
That would be so good for me but I have no idea what to do with the code.

It sucks being a noob.
foobly
16
Years of Service
User Offline
Joined: 10th Feb 2008
Location:
Posted: 19th Mar 2008 09:41
So, could someone please help me find out what exactly is incorrect here:



much abliged.

Login to post a reply

Server time is: 2024-11-24 06:46:46
Your offset time is: 2024-11-24 06:46:46