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 / Item Specific Pop-Up Messages ?

Author
Message
PocoRev
19
Years of Service
User Offline
Joined: 10th Jun 2004
Location: Atlantic Canada
Posted: 24th Mar 2006 18:19
Hi-

If the player collects a turnip, i'd like a popup message that says
'hey you've found a turnip!'

Now the tricky part (at least to me it's tricky ) , is to have say 30 or more 'different' items, ALL of which have their own specific pop up message. ' you found a turnip' .... 'you found a hampster' etc...

I'd like flexibility in how the message that pops up is presented... text is fine, but i'd also like to have the option of using graphics, audio, video etc..

How can i do this?

The person that provides me with the solution I actually use in my game will get 5 free skycube packs (2 skycubes in each pack for a total of 10 skycubes) from my site :

[href]www.pocorev.com/stl[/href]

Thanks in advance

Professional Atmospheric Skybox Textures
http://skymatter.thegamecreators.com
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 24th Mar 2006 18:41
I dont know how to script it, but you get the script to display an image of text, with an alpha channel. Just apply the script to your item.
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 24th Mar 2006 19:45
poco, what you want is easy, however the problem, as you said, is the flexibility.

The simplest way to do this is editing the engine, as you are 2004 I assume you have DBP

Use the entity name entityelement(e).eleprof.name$ and have it call a sound based on it's name. If you actually need help from here, I'll see what I can do... I just don't like sifting though the source.

Mosillivo: Fires Rage, Earth Rumble, Evil Reigns, Cities Tumble
Join the NJL: The War Has Begun, Which Side Are You On?
Nunticaelitusphobic (Scared of Internet)
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 24th Mar 2006 19:46
You need to give every item a number property and make a code for evert number that says:
(Exmaple) "You picked up a MP40"

[href]www.freewebs.com/edromeproductions[/href]
look there for all my model packs latest updtes and other stuff!
(its not old yet)
PocoRev
19
Years of Service
User Offline
Joined: 10th Jun 2004
Location: Atlantic Canada
Posted: 24th Mar 2006 20:08
hi guys... thanks for your replies

here's the deal - i'm an artist , which (almost by definition) means i suffer from programming retardation

i'll forget about the flexibility thing for the time being, and if someone can script me a working solution that will allow me to display a unique text/graphic for each item collected (up to 30 items), i'll gladly give them 10 packs (20 skycubes in total).

is this doable? does it sound fair?

thanks again for your attention to this.

Professional Atmospheric Skybox Textures
http://skymatter.thegamecreators.com
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 24th Mar 2006 20:38 Edited at: 24th Mar 2006 20:40


its simple, take the code above, and make a new script with every image you want.

For example,

if you want it to say "You found a turnip"

you copy that script, change the image to an image that says "you found a turnip" and save it in script bank as "turnip.fpi"

then place your turnip in-game, and right click on it and for the main script, give it turnip.fpi.

there is also a suond in the script, if you dont want a sound, you can take it out, but it helps to recognize the prompt

Presto!

PocoRev
19
Years of Service
User Offline
Joined: 10th Jun 2004
Location: Atlantic Canada
Posted: 24th Mar 2006 22:27
@ BULLSHOCK 2 - ahh yes ! we're on the right track now!

How do i get the message (graphic) to remain displayed until i hit a key - OR - at the very least, how do i get it to display longer than it does?

Professional Atmospheric Skybox Textures
http://skymatter.thegamecreators.com
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 24th Mar 2006 22:36
well, currently in FPSC, there is no Onkey type command, so you cant make it to where you have to hit a key, but if you want it to last longer its simple.




the timergreater property is in milliseconds, just change that value, and it will last as long as you want.

PocoRev
19
Years of Service
User Offline
Joined: 10th Jun 2004
Location: Atlantic Canada
Posted: 24th Mar 2006 22:50
with the current change to the script, the message appears and remains permanently. i've reduced the timegreater to a value of only 5 with no change.

probably something simple...

Professional Atmospheric Skybox Textures
http://skymatter.thegamecreators.com
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 24th Mar 2006 22:53 Edited at: 24th Mar 2006 22:54
oops




try that

PocoRev
19
Years of Service
User Offline
Joined: 10th Jun 2004
Location: Atlantic Canada
Posted: 24th Mar 2006 23:40
when i inserted the '\' in the media file paths and ran the latest version, the message displays for a second or so (just like in the first version), but no amount of value changing will modify the length of this display time.

i'm getting to the point where my 'non-programmer' ears are starting to bleed

it seems that we're so very close to getting this thing... please try again

Professional Atmospheric Skybox Textures
http://skymatter.thegamecreators.com
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 25th Mar 2006 00:47
sorry pocorev

there is definatly a bug with timer start or timergreater.

ive tried the upper part of 100 combinations, and i cant get it to work, but the instant i remove those 2 commands, it works

this code should work, and it doesnt, so im posting it in the bug reports section.



PocoRev
19
Years of Service
User Offline
Joined: 10th Jun 2004
Location: Atlantic Canada
Posted: 25th Mar 2006 00:57
i just sent you an email.

Professional Atmospheric Skybox Textures
http://skymatter.thegamecreators.com
Les Horribres
18
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 25th Mar 2006 01:20
Bullshox, I thought I explained that to you.

Timer is NOT unique to the enemy, that is why you had to add hudtimer to entitytype. I was fixing that annoying bug.

Mosillivo: Fires Rage, Earth Rumble, Evil Reigns, Cities Tumble
Join the NJL: The War Has Begun, Which Side Are You On?
Nunticaelitusphobic (Scared of Internet)
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 25th Mar 2006 01:41
well should i test it with that new exe i compiled?

Login to post a reply

Server time is: 2024-04-23 17:04:16
Your offset time is: 2024-04-23 17:04:16