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 / glowing stuff...

Author
Message
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 5th Apr 2009 18:51
i have a health dispenser script and would like to make it glow possibly green when u are using it.help please, i am new to scripting and do not know many commands.

dodulee du du!
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 5th Apr 2009 19:18
maybe i am just dumb but what is a health dispenser script?


Red Eye - The Game: Work In Progress - W.I.P. Red Eye Productions
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 5th Apr 2009 19:23
its a script for something like an automed that you use and it gives you health.here is the script.

; Automed Unit

;Header

desc = AutoMed Station

;Triggers

:activated=0,plrdistwithin=50,plrusingaction=1:plraddhealth=1,loopsound=audiobank/atmos/acidhum.wav
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10

:plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:activated=0,plrusingaction=0:stopsound

:activated=0,plrdistfurther=50:stopsound

:activated=0,plrhealthgreater=499:stopsound

:state=100:activate=1,incstate=1,stopsound

dodulee du du!
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 5th Apr 2009 21:28
Here's something for you to consider:

1. 2 different textures.
2. scancodekeypressed=X

If you come up with a test script, even if it doesn't work, I'll help you write one. Not to be cruel, but you're not gonna learn unless you attempt things.

Best,
Crusader2

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 6th Apr 2009 01:23
how would that make it glow?

dodulee du du!
Screaming Head Games
15
Years of Service
User Offline
Joined: 13th Dec 2008
Location: You dont want to know......
Posted: 6th Apr 2009 06:20
changeing the texture would make it appear that it glowed.
i would recomend makeing or finding a decal of somthing glowing then making it transparant and setting up the script so it spawns and destroys on key press.

(\__/)
(O.o )
(> < ) This is your bunny on drugs.
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 7th Apr 2009 01:18
no, i DO NOT want to have to make a separate texture.i just want to glow green like a weapon glows a certain color under itself before you pick it up.

dodulee du du!
Gandalf the New
17
Years of Service
User Offline
Joined: 4th Sep 2007
Location:
Posted: 7th Apr 2009 12:53
look, I dont know much about scripting either, I dont really bother. But what it sounds like Crusader and SHG are trying to say might actually be the only way.

Like I said I dont know much about scripting, but perhaps u could look at the weaponglow.fpi script (or something like that) and look at the code and what makes it glow, and use it for yours.

Correct me if im wrong.

and lulz
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 7th Apr 2009 16:58
thanks for the suggestion gandalf the new.

dodulee du du!
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 7th Apr 2009 22:46
@gandalf the new

i can not find what makes it glow (in the weaponglow.fpi script) help please.

dodulee du du!
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 10th Apr 2009 02:25
I repeat... HELP please.

dodulee du du!
General Jackson
User Banned
Posted: 10th Apr 2009 03:17
ITS A DECAL DUDE IT WONT WORK

there are NO hud glow commands now listen to what they said and make a hud that APPEARS TO GLOW, or if its an entity, MAKE A TEXTURE THAT APPEARS TO GLOW

It is well that war is so terrible or we should grow too fond of it- Robert E Lee
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 10th Apr 2009 15:52 Edited at: 10th Apr 2009 15:53
Here's a suggestion:

Try putting a light marker (pick one of the colors) directly in front of but not touching it. Set the diameter to a small size, something just large enough to cover the dispenser. That should give the impression (roughly) that the dispenser is glowing. Then all you have to do is use a trigger zone to turn the light off when the dispenser is used.

Now, if you are looking to have the dispenser pulse or shimmer, then you're going to need to have a custom model created. And my recommendation on that is to learn modeling. Or pay someone you know to do it for you.
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 11th Apr 2009 02:51
okay...how do i model?

dodulee du du!
General Jackson
User Banned
Posted: 11th Apr 2009 20:26
read a tutorial lol

It is well that war is so terrible or we should grow too fond of it- Robert E Lee
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 12th Apr 2009 17:27
could you please direct me to one?

dodulee du du!
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 12th Apr 2009 21:46
If you know how to texture, you could possibly make a glow map, but I dont know if FPSC supports them, I've never seen it used in FPSC

"I can't imagine what this place would have been like if I hadn't found you here." - BJ Hunnicutt
Bendak11
16
Years of Service
User Offline
Joined: 2nd Aug 2008
Location: The bush in your front yard.
Posted: 12th Apr 2009 22:39
Challenge: I would follow Leon's suggestion. Learning to model is a long, time consuming process, and can't you look anything up yourself? There is an amazing thing called "search box" at the bottom of every page. Type in modeling tutorial and you're sure to get results.
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 15th Apr 2009 04:00
well..isn't there a way I can get a decal to appear on it when I use it? (like on an enemy when you shoot them).

dodulee du du!
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 16th Apr 2009 05:15
well!?

dodulee du du!
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 16th Apr 2009 05:16
hello!?

dodulee du du!
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 16th Apr 2009 15:19
did you try the suggestion I gave you? If not, try it and let us know if that worked. If so, how did it work? Did you try anything else?
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 17th Apr 2009 04:08
no, leon kennedy, i did not.i did not think it would give the desired effect.

dodulee du du!
JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 17th Apr 2009 13:09
Fixed script. Probably won't work, because you initial script was goblteegook.


Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 17th Apr 2009 14:58
Quote: "no, leon kennedy, i did not.i did not think it would give the desired effect."


If you didn't try it, how do you know that it won't have the desired effect? At least give it a shot, dude. Knowing this is going to make me less inclined to help you in the future...
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 19th Apr 2009 04:10
ok...(the challenge master relents) i'll try it...

dodulee du du!
Apple Slicer
16
Years of Service
User Offline
Joined: 14th Nov 2008
Location: Oregon, in the rain...
Posted: 19th Apr 2009 08:58
Its scary how you type in third person...do you do this in real life too?
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 19th Apr 2009 09:16
If you actually want it too glow you would have to use bloom.

Migration Discussion Thread: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Piracy Discussion Thread:
http://forum.thegamecreators.com/?m=forum_view&t=142774&b=21
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 20th Apr 2009 03:44
@apple slicer:

WAHAHAHAH!(the challenge master laughs evilly)i have POWER over you!you are afraid of how i type in third person!!!

@marc steene:

whats bloom?(the challenge master looks at marc steene questioningly)

dodulee du du!
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 21st Apr 2009 03:53
halluuuuuuuuuuuh!(the challenge master looks around).

dodulee du du!
Apple Slicer
16
Years of Service
User Offline
Joined: 14th Nov 2008
Location: Oregon, in the rain...
Posted: 21st Apr 2009 04:05
Bloom is Glow...from lights...

You know how if you stare at the sun for 10 minutes and your eyes start to burn, and you look away, and its hard to see for a while?

yeah, thats bloom at work.
Bejasc3D
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Down Under
Posted: 21st Apr 2009 10:49
Your really best of trying Leon's suggestion, and then work off of that... If you havent tried it, how do you KNOW that it WONT give the 'desired effect'

Its like judging a book by its cover, or a food by its smell.

~ Benny Boy 2321 ~ Raw Sandvich ~
Sgt Kennedy
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location:
Posted: 21st Apr 2009 11:07
It'd probably be in your best interest to LISTEN to what everyone's telling you anyway, then they will be more implied to help you in the future
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 21st Apr 2009 14:50
Quote: "halluuuuuuuuuuuh!(the challenge master looks around)."

Stop speaking in the third person. It isn't as cool as you think it is.

Quote: "Your really best of trying Leon's suggestion, and then work off of that... "

That's what I said. Have you tried it yet? Did it work?

Priest of the Church of Joe Wood
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Apr 2009 07:27 Edited at: 24th Apr 2009 08:13
@JRH:

If you had gone through the tutorial I wrote that MADE this script, it wouldn't look like "gobltgook".



@The challenge master:

Here is your free lesson from someone who may actually be able to help you... you ready for it? Okay, let's take it from the top. (I don't do this very often anymore, so do yourself a favour and pay attention! )


Section 1: The Decal

The "glow effect" you see underneath those floating weapons is called a decal. Decals are 2D images textured onto a flat object known as a "plain" (or so the DBP manual would have us believe.... joke) in rapid succession, to give the illusion of animation. You following so far? Good!

These decals can be found in the following folder:
gamecore\decals

You'll see lots of folders in there, each one containing a texture and a text document. The text document tells FPSC specific things about the decal. Right now, this is not important. What you need to know is how to apply these decals to your automed, so let's get onto that.

For starters let take those weapons you mentioned as an example. Each of them had a red/yellow ring underneath of them, correct? Where did this come from? I'll tell you.

Let's use the "law" as an example weapon. It's a bazooka that can be found in the "generic" category of entity's. The information we're looking for is in the following folder:
entitybank\generic\items

Go into that folder and find the file called "law.fpe". A little general knowledge here for you... FPE files contain information about an FPSC Entity. With that in mind, let's open it up in Notepad and take a look at what makes the "law" entity tick. (Reminder, this file contains info about the law ENTITY and not the gun itself... that is found elsewhere)

Inside you'll see lots of stuff about AI, spawning, properties, orientation and the like... but what you're interested is at the Verrrrrrrrry bottom.
You should see:
Quote: ";Decals
decalmax = 1
decal0 = glowred"


This is where that little glowing circle comes from. The law entity is told that it should use the "glowred" decal. You can look at this decal in it's texture form by going into the decals folder and finding it like I showed you just earlier in this mini-tut.

Now that we know HOW the weapon knows what decal to use, let's tell your AutoMed to do the same. First we need to find it in this sea of folders... to save you some time, you can find the scifi one here:
entitybank\scifi\wall furniture

Open up the "automed.fpe" file.
You'll notice that there is NOTHING in here that tells it what decal to use. Let's copy and paste the decal lines from the law.fpe into the automed.fpe at the very bottom. It should look something like this:


There... now the automed has a decal to use. It will use the glowred decal. I'm not too fond of this decal for medicinal purposes, though... I much more prefer the "shockwave" decal, so I changed it to that.

After adding that, save the file and close it.


Section 2: The Script

Now... there's one thing left to do. You need to tell the automed WHEN to run the decal.

We don't yet know what actually runs the decal, so let's open up that "weaponglow.fpi" file and find out.
It looks like this:


Here is the line that uses the decal:
Quote: ":state=10:rundecal=5,spinrate=4,floatrate=10"


This is the line that JRH used for his "fixed script". But, what I bet he didn't do is give the automed the decal, like we just did. Since the automed is a mounted item and SHOULD NOT spin NOR float up and down... you can cut out the "spinrate" and "floatrate" commands from JRH's script.


Here's your detailed scripting lesson -

"rundecal" is a command that tells FPSC that it needs to do the following:
- Show the entity's decal
- Animate the entity's decal
- Orientate the decal properly

But how does it do all of that in just one command?
It does all of this with the number that you pass into the command.

What does that number tell FPSC, though? And why are we using "5" for the weapon?

Here are all the numbers accepted by the command and what they do:
-1 - Stop playing a looping decal
0 - Animate once while ALWAYS facing the player
1 - Animate once while keeping the decals orientation from the Editor (How you put it in the level)
2 - Loop animation while ALWAYS facing the player
3 - Loop animation while keeping the decal's orientation from the Editor
4 - Animate once and face straight up
5 - Loop animation and face straight up
6 - Character spot decal (At end of entity character's gun, usually)


Now, it's up to you to decide how you want the decal to be played.
For an automed, I would prefer that the decal NOT always face the player, but instead keep it's rotation. Since this decal is bound to an entity through it's FPE file, the decal will have the orientation of the automed. So it will be at the same height, location, and rotation of your automed. To get this effect, we would use a value of "3" for the "rundecal" command. Now remember, this will loop the decal indefinitally until we tell it to stop. We'll put the "stop running decal" parts where the "stopsound" commands are.


So... taking JRH's "fix" and re-editing it, we'll get something like the following:



Btw... this doesn't look like the script I made... so, either you edited it, or you copied it wrong. I see that some parts are missing, such as preventing the automed from giving MORE health than necessary.
If that was your intention, that's fine. Edit it as you see fit.


Your decal will now be visible out of the sides of the automed while it is healing you. If you don't like the decal, feel free to change it to something else or use a different "rundecal" value to get different effects.

This concludes today's lesson. If you are still completely and utterly lost... I recommend you read my other tutorials in the Official Community Guide, specifically the ones aimed towards scripting beginners.



For a small recap, here's what needs to be done:
- Edit the AutoMed.FPE file to give the AutoMed a decal
- Change the script to make the decal appear


The one and only,


Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Apr 2009 07:42 Edited at: 24th Apr 2009 07:47
Double post... my bad, but this needed it's own spot for some reason


NOTE WITH THE ABOVE TUTORIAL!!!

Decals that are played on entities are located at their MODEL-SPACE CENTER! This means that in your modelling program, if you're planning for an entity to use a decal, then it must be located (0,0,0)


The one and only,


Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 24th Apr 2009 14:55
Ply, with your instructions on the decal thing above I think this post now needs to be stickied. Excellent description of what happens, and how to accomplish it.

Priest of the Church of Joe Wood
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Apr 2009 02:56
I'm hoping Nickydude will, at the very least, include that in the community guide. Or someone else will put it up on a tutorial site.


The one and only,


Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 26th Apr 2009 10:16
whats bloom?(the challenge master looks at marc steene questioningly)

Umm (marc steene stares into the sky in deep thought) Have a look at this picture (marc steene hands over the link to the challenge master) http://img.photobucket.com/albums/v726/un_om_bun/Crysis2007-10-2815-25-11-70.jpg. Look at the sun (marc steene explains), see how it glows? That's bloom.

Migration Discussion Thread: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Piracy Discussion Thread:
http://forum.thegamecreators.com/?m=forum_view&t=142774&b=21
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 29th Apr 2009 00:19 Edited at: 29th Apr 2009 00:45
@plystire:

thank you! but i still have a question.do i have to put in the
Quote: ";Decals decalmax = 1 decal0 = shockwave"

thing at the bottom of the fpe file?

p.s.
I thought that the shockwave decal worked best too.

dodulee du du!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Apr 2009 07:02
Yes, the FPE file MUST contain that information in order for the entity to use the decal.


The one and only,


The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 8th May 2009 04:25
thank you!!!!

dodulee du du!

Login to post a reply

Server time is: 2024-11-25 01:42:39
Your offset time is: 2024-11-25 01:42:39