Page 1 of 1

Changing maps upon death + unregistered sounds

Posted: June 23rd, 2010, 9:18 am
by AName
How do I change maps upon death? It would be kind of cool to not only change maps but make it slowly fade to black first, show some text, change maps, and then slowly fade back into visibility. Can I get help with that too? =)

Also, why am I getting "unregistered sound 24/25" when I die in lava, and how do I fix it? :o

Thanks

EDIT: There's also "unregistered sound 65". :P

Re: Changing maps upon death + unregistered sounds

Posted: June 23rd, 2010, 9:56 am
by klimyriad
1: Not sure if you can but i think if you can code you be able too
2: yes you can it just not registered in sandbox but i think you need to code (not sure if i right with that)

Anyway hope this helps

Re: Changing maps upon death + unregistered sounds

Posted: June 23rd, 2010, 11:58 am
by AName
Not really... Neither of those fix my problems.

Re: Changing maps upon death + unregistered sounds

Posted: June 23rd, 2010, 1:12 pm
by arcones
Changing maps by death would require some intricate coding. That doesn't mean it's impossible or extremely difficult. There are topics for linking maps together in the support section. Once you figure out how to get that to work, move on from there ;)

Arcones :geek:

All the code would go in the config file.

Re: Changing maps upon death + unregistered sounds

Posted: June 23rd, 2010, 1:50 pm
by AName
This is the only one I found:
viewtopic.php?f=15&t=1249&p=9718&hilit= ... +map#p9718

and I don't understand how it works.
After a little bit of tweaking and messing around, i have managed to get teleporting to work. (You must set the entities type to 2 or something, and then set the tag to a number- then go into your map script and type "level_trigger_*number* = [map "*Map Name*"])
level_trigger_2 = [echo "*message*"; endsp; sleep 1000 [map *name*]]
I see the config edit when I press F6 and I know how to place entities with the GUI, but that's it. Where would my entity go? Would it have a humongous radius? Does the player have to the touch the entity for it to work (I need it to work when the player dies)? How do I set the entity to work with the trigger?

Among that are the other questions I had, such as:
How do I make it fade out, make text display, and then have it fade in a couple of seconds later? I guess that's what echo and sleep are for. Would I just do something like this in the F6 config editor?

Code: Select all

level_trigger_2 = [sleep 1000; echo "Here's a different map:"; endsp; sleep 1000 [map mapnamehere]]
EDIT: Okay, I finally figured out how to link an object to a trigger (I used this for help - just to help out those who are reading this: viewtopic.php?f=24&t=532&p=2481&hilit=trigger#p2481)

but I still have no clue how to get it to work when I die. Do I have to use purely code, and if so, what?

Re: Changing maps upon death + unregistered sounds

Posted: June 28th, 2010, 8:42 pm
by Leo_V117
you could try this:

Code: Select all

[if (= $nap 1) [echo "You Died. Noob"; sleep 500; endsp; sleep 500; [map mapnamehere]]
I have never used it before... but hey...

Then theres this... If that code works, try this:

Code: Select all

[if (= $nap 1) [echo "Noob Fail! You Died Again!"; sleep 100; addpostfx invert; sleep 1000; endsp; [map mapnamehere]; clearpostfx]
These are untested codes... I didnt have time to test them...

Re: Changing maps upon death + unregistered sounds

Posted: June 29th, 2010, 9:40 pm
by Hirato
in both RPGs (the released and the 'experimental' in the SVN), you can set a death script on your player that executes when he goes to say hi to his maker.

I think it'd be r_death [map blah] for the released RPG, I'm very unfamiliar with it right now

for the new one you'd define a script and assign it to the player, ie

r_script_new
r_script_death [map blooh]

Re: Changing maps upon death + unregistered sounds

Posted: June 29th, 2010, 10:50 pm
by AName
r_death [map mapnamehere] works, but there's 1 problem with that - My game needs to be FPS. :S

This is for several reasons... In RPG mode:
1. When it goes to a different map, the player is still dead.
2. I can't seem to get jumpvel, movespeed, or gravity to work (which are all vital parts of my game).
3. There are extra HUD items, spells, etc. that I don't want in my game at all.

So, is there (A) a way to fix all 3 of those while maintaining RPG mode or (B) another way to change maps upon death so that it happens in FPS mode?

Thanks for the help!