Page 1 of 1
Space Heroes
Posted: Thu Jun 12, 2008 5:38 pm
by authraw
So I was thinking about space maps recently, and I was trying to think of some things that would make them more interesting. What I realized is that space maps don't get heroes, for several reasons. It doesn't seem like something that would be too hard to add, however.
In order to make space heroes fun, I'd have to find solutions to the following problems:
1. Space heroes need their own personal ships that only they can use
2. Ships killed while inside of a vehicle would have to count towards the hero's health bar
I have a few ideas about how to fix #1, but I'm not sure how to script them:
*One solution would be to script it so that any time the hero's ship is entered, it checks to make sure you are the hero and ejects you if not.
*Another solution would be to force the hero into his/her ship (which is created out in space somewhere) as soon as he/she spawns.
The second problem could be solved by making the hero a selectable unit that is unplayed by the AIs and with a max count of 1, but if there's a way to do it using the hero function, that would be better.
Could anyone suggest some solutions to these problems? Is there something that I missed?
Re: Space Heroes
Posted: Thu Jun 12, 2008 8:10 pm
by computergeek
there is a thread about forcing people into vehicles here
http://www.gametoast.com/forums/viewtop ... 27&t=12464
and you should be able to add heros regularly and by destroying a ship they are killing someone, so i will add to the heath
but the lightsaber will go over the normal health bar
Re: Space Heroes
Posted: Thu Jun 12, 2008 8:15 pm
by Fingerfood
You could always make them normal units, but you could put a HUGE region around the map, and change the heroes class to something unique, then make the big region a damage region for the heroes unit class.
Re: Space Heroes
Posted: Thu Jun 12, 2008 10:43 pm
by authraw
Fingerfood wrote:You could always make them normal units, but you could put a HUGE region around the map, and change the heroes class to something unique, then make the big region a damage region for the heroes unit class.
Oh, that's something I never thought about--but then the hero won't recover when he/she kills enemy units.
I've been thinking about the hero ship thing, and I'm beginning to think that the first idea is the better solution, but I'm really not sure exactly how to code it in the LUA. I have a feeling it would look something like this:
OnVehcleEnter{
if vehicleClass == "imp_heroship" and playerClass != "imp_hero_vader" then
ejectFromVehicle(player)
end
}
Unfortunately, I don't know the real function calls and whatnot. Are there functions that would allow me to do this?
Re: Space Heroes
Posted: Fri Jun 13, 2008 7:54 am
by Fluffy_the_ic
You could put a barrier around the ship that only, say HOVER can go through. Classify the heroes as HOVER and the units as anything else, but that will only prevent AI from getting in the ship.
Re: Space Heroes
Posted: Fri Jun 13, 2008 11:07 pm
by Blade
Fluffy_the_ic wrote:You could put a barrier around the ship that only, say HOVER can go through. Classify the heroes as HOVER and the units as anything else, but that will only prevent AI from getting in the ship.
In fact, I think I read somewhere (Have no idea where, sorry) that you can modify an invisible collision to let certain unit types through, (Something about SetCollisionType... er, probably not, but we'll see) I'll have to look at the odf and check it out. (Thinks, "Ah, how I love finally somewhat understanding the inner workings of odfs.")
EDIT: Hm... no idea where I got that idea, as I've just had a peep at the odf and found nothing of the sort. (Ok, I don't know 'that' much about odfs...) I'll keep a watch for it, and get back to you (if you want) when I figure out what the bloody "AGH" i was thinking about...
EDIT2: Eh, sorry, I was thinking of something completely different (actually, I've no right idea about what I was thinking, but I wouldn't publicly display that...). Anyway, I'm not sure if this will help, but this topic deals with a similar question (about the Only heroes entering a vehicle, not the whole thing):
http://www.gametoast.com/forums/viewtop ... pe#p226605
Sorry I couldn't be of much help... I'll continue poking around a bit to see what I can discern from my mindless notes and ramblings...