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 / Shooting chests and getting ammo + health

Author
Message
Heiner McHink
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location:
Posted: 23rd Aug 2006 10:57
Hi there, i would like to know if it is possible to have a script for the gun, which makes it possible to shoot a crate or another entity and if you hit it, either add health to the players health or add amo to his ammo?
Then, do you know if it would be possible to have a crosshair marking the target area of the gun?
Finaly, i am thinking about visible shots like laser beams. Could that be done with FPSCreator.
Thanks for helping me out!
Heiner

Imagination rules!!!
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 23rd Aug 2006 16:04 Edited at: 23rd Aug 2006 16:06
Hi Heiner McHink,

As for your first question, you can place health or ammo inside a crate within the editor. Make the crate's physics weight high, like 100,000 so that it can't be moved, but leave it dynamic. When the player shoots the crate it will break apart, showing whatever you have placed inside. You may want to change the default script for the ammo or health from glow to show only. Hope that helps.

I already have a crosshair marking the target gun area by default. You should too.

As for your last question....... I don't know.

Happy game making.

Jiffy
20
Years of Service
User Offline
Joined: 5th Mar 2004
Location: Hiding in the bushes in your backyard
Posted: 23rd Aug 2006 16:28 Edited at: 23rd Aug 2006 16:28
Alternate to turning up the weight you can just turn off physics for the crate altogether, can't you? I would've imagined that physics wouldn't effect the gib...

But now that I think about it I suppose it does


Evil has a new name. Demo out now!
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 23rd Aug 2006 17:29
You're going to have some trouble with laser beams.
FPSC doesn't have a lot of particle support.
Even scifi weapons don't shoot laser beams.
That doesn't mean that somebody won't figure out something though.

Heiner McHink
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location:
Posted: 28th Aug 2006 18:33
Hello, Thanks for the replys. The thing with the crosshairs was my fault: It was a while back, when i last touched FPS and then i did not recall, that there is one allready.
Regarding the problem with the healt pac, which is piced up uppon shooting it and hitting it, i was thinking, that this must be possible via a script, by adding the amout of health (or ammo) when a hit is scored on that item.
About the laser beams: Since i want my actin to go on in a not so large room, i was thinbking, that it could be a way, if i have the weapon graphics with an animation. Then i place a cylinder inside the barrel of the Laser gun, and have it extend with an mesh animation to a certain degree, just for 2 or 3 frames, and then go back to normal again. I could no try that, because of no time, but i think, theoreticaly, that could be a solution to my problem, what do you think?
Heiner

Imagination rules!!!
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 28th Aug 2006 18:37
I have thought about modeling a laser beam so it comes out of the weapon but there are issues like what to do with the model of the beam when it is not shooting out of the gun and what happens when the model of the laser beam comes in contact with other stuff,etc.
That doesn't mean I am done trying though.

uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 28th Aug 2006 19:25
I would give it up until TGC or someone else includes true particle support for FPSC.

Theres no substitute for real feature support across the board whatever features you seek. Half baked attempts look awful in my opinion and do nothing to enhance your game.

I have experimented with a lot of things not included by default in FPSC - some I keep if the results are reasonable as thats about the best one can expect - others I just bin em as they just dont do justice to what you may be trying to achieve. Most have issues as they are not engine supported but are workarounds and the results are less than perfect.

True laser weapons do or at least can require a very advanced set of features and functions to make them flexible, realistic and work well and free from errors or issues. Thats true for most advanced features and theres no real way around it but to do it right. That means building into the base engine.

You either have particle weapons or you dont. Particles are something that is very difficult to substitute a workaround for.

Anyway good luck with that FredP.



"I am and forever will be your friend"
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 29th Aug 2006 00:47
I can tell you right now while the concept is alright I have not found a way to make the theory work in practicality.
Or,in simple terms,it looked good on paper but so far nothing has worked to my satisfaction.
As Uman has stated until we get proper particle support laser beams and stuff like that are not going to work properly.
We can only wait for particle support.

freakshow
18
Years of Service
User Offline
Joined: 17th Dec 2005
Location: Tewksbury, MA
Posted: 30th Aug 2006 02:40
well, you COULD make a laser beam projectile and make it shoot out of the gun. Ive tried making a plasme gun like that and the only problem was positioning where the plasma appears when shot. As for the impact, you could make a laser impact decal and set it to appear when the beam hits a wall.


Project:V, where something always lies in the shadows...
Formerly Crazy Al
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 30th Aug 2006 03:26
The problem is that if you make a model of a laser beam if an object is close or far away the model of the beam would have to extend to various distances to covey realism.
I don't see how it would be possible to animate a beam model that requires multiple distances since you would not know exactly how far the beam would have to travel before it collides with something.
If you make the model of the laser beam go a certain distance and the object that you are shooting at is too close or too far away the whole thing would just suck.
I am hoping that someday FPSC supports particles so that you can make laser beams and stuff like that.
At this point in time I don't see how it can be done effectively without particle support.
That is not to say that someone else can't figure out a way to do it.
I am just saying I can't.
This is the same reason that I haven't tried making a fire extinguisher,a fire hose or a flamethrower as a weapon.
Without particle support I haven't found a way to make these effective weapons either.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 13th Sep 2006 02:13 Edited at: 13th Sep 2006 02:15
Quote: "well, you COULD make a laser beam projectile and make it shoot out of the gun. Ive tried making a plasme gun like that and the only problem was positioning where the plasma appears when shot. As for the impact, you could make a laser impact decal and set it to appear when the beam hits a wall."


I need to look into that, I was looking into that but all projectiles use the new explosions now, does FPSC still support decals for explosions?

EDIT: Found this in the flak spec, and wow, this will really help me out:
Quote: "explodeonhit = 1"
I guess I just set it to zero and I can make my plasma weapons for my Doom Fan Game Sequel

My Apps:
Decal Maker
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 13th Sep 2006 03:31
Quote: "EDIT: Found this in the flak spec, and wow, this will really help me out:
Quote: "explodeonhit = 1"
I guess I just set it to zero and I can make my plasma weapons for my Doom Fan Game Sequel
"


well you could, but FPSC engine overrides that unfortunately, and you'll still end up with an explosion.

with regards to adding health for shooting enemies, add the line

:shotdamage=1:plraddhealth=1

to the scripts that the enemy is using

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 14th Sep 2006 00:42
Quote: "well you could, but FPSC engine overrides that unfortunately, and you'll still end up with an explosion."


Whaa? Oh shoot, there goes my chance at making a flamethrower Though low powered explosions could still be acceptable...but not for a plasma gun.

My Apps:
Decal Maker

Login to post a reply

Server time is: 2024-11-23 00:11:32
Your offset time is: 2024-11-23 00:11:32