View Full Version : Solo game question
Arightwizard
September 14th, 2009, 05:11 PM
Hi, I am new to map making and so I need to bother you with my nonsensical questions. I would like to ask if any of you know how to end a solo game. I have tried scripts to even end the game as soon as you enter it, but none work. I am currently trying game_won but to no avail. I would really appreciate help. (Yes, it is set up as solo (done in Guerilla)) (Yes, I click compile scripts and then save scenario) (No, no errors come up)
Thanks,
-Arightwizard
Examples of scripts I've tried that didn't work:
(script startup endgame
(sleep 5)
(game_won)
)
(script startup endgame
(game_won)
)
(script startup endgame
(sleep_until (vehicle_test_seat_list drive_me "wdriver"
(players)))
(deactivate_team_nav_point_object "player" drive_me)
(game_won)
)(endgame = script's name and a trigger volume's name)
(script startup endgame
(sleep_until (volume_test_objects endgame (players))15)
(game_won)
)
the1
September 14th, 2009, 05:27 PM
where are you placing your scripts? data or tags folder?
they need to go in your data folder and you need to create a folder called scripts in your map folder. the same place you see the bitmaps folder...
if there are no scripts to compile it'll always say compiled successfully thats all :)
and game_won does work if scripts are compiled succesfully XD
Arightwizard
September 14th, 2009, 05:44 PM
where are you placing your scripts? data or tags folder?
they need to go in your data folder and you need to create a folder called scripts in your map folder. the same place you see the bitmaps folder...
if there are no scripts to compile it'll always say compiled successfully thats all :)
and game_won does work if scripts are compiled succesfully XD
They are in data/levels/etc/etc/etc/scripts.
But game_won seems to not work. If you say that it works, explain to me what it does. Does it just send data saying you won? Or does it end the game also?
**Update**: Now I tried this:
(script startup endgame
(sleep 125)
(fade_out 1.0 1.0 1.0 99)(cinematic_show_letterbox 0)
(sleep 120)
(game_won)
)
It fades away, but it does not complete the level. So can anyone tell me what might be wrong in every one of those scripts? Or what might be wrong with the map to cause it to be that way?
the1
September 14th, 2009, 06:25 PM
it should also end the game.... hmmmm :S.... not sure...... hmmmmmmm
oh!!! that only works if you specify the next map... and because you can't specify the next map on a custom map... it uhhh doesn't... wor........ try
map_name "name of map string here"
then try
game_won
you have to specify the map before it will load the next map i think.... i can't remember how i did it :S
Arightwizard
September 14th, 2009, 06:35 PM
it should also end the game.... hmmmm :S.... not sure...... hmmmmmmm
oh!!! that only works if you specify the next map... and because you can't specify the next map on a custom map... it uhhh doesn't... wor........ try
map_name "name of map string here"
then try
game_won
you have to specify the map before it will load the next map i think.... i can't remember how i did it :S
I followed your advice and now I use this:
(script startup endgame
(sleep 125)
(fade_out 1.0 1.0 1.0 99)(cinematic_show_letterbox 0)
(sleep 120)
(map_name salisp)
(game_won)
)(Yes, I use salisp for tests.)
And for some reason now it likes to spaz out. It starts, ends, starts, ends, all on the same map over and over and over et cetera.
**Edit**: Oh wait hold on, I think I know why..I'll try switching them around. (I've had personal experience with finishing salisp and when it's done it goes to a10, my map's name. So it goes to salisp and then the game_won works there...You get the idea)
***Edit***: Nope, it still spazzes out.
Rob Oplawar
September 14th, 2009, 08:35 PM
This is relevant to my interests.
Have you tried switching the order of game_won and map_name? Or removing the game_won altogether? It's possible game_won is intended for mp, not sp... It's been ages since I've messed with that sort of thing, though.
the1
September 14th, 2009, 08:52 PM
if you look at the script.doc created by sapian. it says something along the lines of
bla bla bla move on to the next level bla bla bla...
uhhhh hmmmmmmm when i get home from work ill ask sonicxtreme for some of my old scripts. he has all the sonic team related scripts for level changing for special zones.
dam its been too long XD.
Epsilon927
September 14th, 2009, 09:00 PM
Game won only loads maps from the original campaign, from my experience. If you don't have a10, then nothing happens, I believe. Remove it, because it's kind of redundant, if you're using map_name as well.
Arightwizard
September 14th, 2009, 09:14 PM
Game won only loads maps from the original campaign, from my experience. If you don't have a10, then nothing happens, I believe. Remove it, because it's kind of redundant, if you're using map_name as well.
The map's name is a10.map. (One I'm making)
So you're saying if I get a30 it'll work? Don't blame me for asking, I know nothing in this situation.
Kornman00
September 15th, 2009, 08:56 AM
Yeah, the names of all the campaign maps are hard coded, so you'll have to follow those names. There are ways around this fact but unless you know how to use C++, you won't be able to get around it.
Arightwizard
September 15th, 2009, 04:52 PM
Whoaly crap! I got a30 and it worked. Thanks the1, Epsilon, and Kornman.
-Arightwizard
(By the way, kornman, I do know some c++ but it would depend on the task. I'd ask you about it but I'm afraid I'd be wasting my time trying to figure it out.)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.