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 / Animated Hud [Weather] Script/Question

Author
Message
AaronG
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location: Millstone, NJ
Posted: 1st Jan 2010 19:15 Edited at: 1st Jan 2010 19:49
Hey everyone,

I'm not much of a coder myself, but through researching animated HUDS on the forums the past 2 days, I came across this script by Conjured...




I was merely wondering if I were to make each one of the hudimagefine="" commands refer to an image to a looping snow texture (snowing/hail) would that basically do the same thing as rolfy's weather system? And do you think this could be repeated for effects such as rain?

The reason I'm asking is because I'm not at home to test this script or my ideas.

Thanks,
AaronG

The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 1st Jan 2010 19:36 Edited at: 1st Jan 2010 19:38
Quote: "would that basically do the same thing as rolfy's weather decal? And do you think this could be repeated for effects such as rain?"


Thought that rolfy only used huds, to decrease the amount of FPS. When You walk into a trigger zone it "simulates" a snow/rain decal.

Yes very possible but for every second i would have used
10 for poor image resulution , 20 for great and 40 for superb.
If you create the huds i might help you script if i get time. This is not a tricky thing. The only thing stupid about this idea is that when you are outside of the triggerzone looking into it there is no snow. Therefore you would need a decal to simulate that to and once the player steps into the triggerzone it would vanish.(to save FPS). But if you want something realistic go and wait for the uppdate of Fenix which will include a weather system. with easy use.


-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
AaronG
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location: Millstone, NJ
Posted: 1st Jan 2010 19:48
Thanks for the help. This would be used in an outside level so the decal won't be necessary.

Quote: "Would that basically do the same thing as rolfy's weather decal? And do you think this could be repeated for effects such as rain?"


I mistyped that, sorry haha. I meant weather system as opposed to decal.

Quote: "Yes very possible but for every second i would have used
10 for poor image resulution , 20 for great and 40 for superb. "


Now what does that mean exactly?

The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 1st Jan 2010 21:13
Quote: "Now what does that mean exactly?"

Sorry maybe i took it a little to fast, i ment per second you would need the hud to change now out of one second there it is 1000ms if you want a fair "weather" you could only use 10 huds/per second.(is enough forget about my 20 and 40 per second).



-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
AaronG
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location: Millstone, NJ
Posted: 1st Jan 2010 21:21
Ohh okay. I'll probably set it up to do 40. So how would I go about setting up the script?

The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 2nd Jan 2010 00:01 Edited at: 2nd Jan 2010 00:04
i would go with 10, 40 is quite stupid if you are not planning to make a next generation game.

You would need one of these per hud file...



At the last hud file you add to youre script you would need to put



NOTICE THE HUD THAT YOU EXPLAIN TO SHOW UP IS THE NAME OF THE COMMAND "HUDNAME=X"
Now a state is what order the FPSC will read the script, so after state=1, you go to state=2. and so on.

Then you would need to set up a timer.



Now the thing about scripting is that every line of code has to start with a : and when we diffrence the IF AND THEN
with also a : in the middle of our script which is sort of there to keep things in order we never make a scrit with then first...

So what the code over me is saying is; If state equals 1 then timerstart then state=2.

After that you would need to make the huds show up.



Now what we said in real english; If state equals 2 and if timer is greater then 100 (ms, a thousand is 1 second) then hudshow yourefilename then state equals 3.

Now after the first one has shown up you need to add the other.




Increment (+) every state as you go into a new line. and you might also notice that between every (THEN)action or conditon (IF)We add a , to symbolise that we have added a new command to our script. Go ahead try making some uppload it and ill double check it for you. Dindt know your skill with scripting, so i guessed it was poor or little so i made it step by step. If i went a little fast please ask what you are wondring on. I am practicing to make a tutorial later from noob-PRO-BEAST or something like that.
Hoped it helped.

-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
AaronG
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location: Millstone, NJ
Posted: 2nd Jan 2010 02:39
Dude, thanks so much for the help! Wasn't expecting a personal tutor.

Here's mine...don't know for sure if it's right. I've done some minor scripting in the past, but nothing with AI or Huds.






The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 2nd Jan 2010 03:12
Quote: "Dude, thanks so much for the help! Wasn't expecting a personal tutor. "

Dont mention it


You dont show HUD10 at all, basicly you would need another line of codes to use HUD 10 to. Other then that your script should function. And i see that added a little pause to?


-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
AaronG
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location: Millstone, NJ
Posted: 2nd Jan 2010 03:20 Edited at: 2nd Jan 2010 03:24
I don't want it to pause, so if I just fixed up the code I should be set?

Edit: Or Ill just remove the state0 line for hud10...right?

The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 2nd Jan 2010 03:28
Quote: "Or Ill just remove the state0 line for hud10...right?"


Correct


Quote: "I don't want it to pause, so if I just fixed up the code I should be set?"


No,see attached code.


-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
AaronG
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location: Millstone, NJ
Posted: 2nd Jan 2010 03:49
Okay, thank you so much for the help. You see, I'm good with art/design but I'm horrible at the nuts and bolts of game creation. I wanted this script so I could have seamlessly looping snow in an outdoor level I'm working on, similar to the one in Modern Warfare 2. It would be light snow, so it'd have to repeat seamlessly or it'll look bad. I may have to add more huds, because it'll be rather slow moving snow.

The attached code should be the final product, I'm assuming. Also, xplosys recommended attaching such a type of code (one that always must be dynamic) to the main AI of a dynamic light, this way throughout the level it's always dynamic even from the start, this way it doesn't have to be spawned via trigger zone, unless the player goes in a building or something. But, that shouldn't be a problem.





Thanks again!

-AaronG

The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 2nd Jan 2010 16:01 Edited at: 2nd Jan 2010 16:03
Quote: "The attached code should be the final product, I'm assuming. Also, xplosys recommended attaching such a type of code (one that always must be dynamic) to the main AI of a dynamic light, this way throughout the level it's always dynamic even from the start, this way it doesn't have to be spawned via trigger zone, unless the player goes in a building or something. But, that shouldn't be a problem."


I havent tried with that with a light yet but it most likly works.
Just glad i can help,The code should work now i just did this by memmory. (to lasy to open up the edit pad)
Hope your game works out well for you
Dont be afraid to ask for more help, i will help you as far as my limits with scripting goes.

When can i excpect to see your game?

-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
AaronG
18
Years of Service
User Offline
Joined: 28th Oct 2006
Location: Millstone, NJ
Posted: 2nd Jan 2010 21:41
Thanks man, I'm hopin for a demo by late January.

Login to post a reply

Server time is: 2024-11-25 03:40:13
Your offset time is: 2024-11-25 03:40:13