Game Development Community

Lightning pack

by Mak Andrew · in RTS Starter Kit · 12/01/2004 (3:48 pm) · 8 replies

Anyone have tried using lightning data?

(below is part of my script)

datablock LightningData(LightningStorm)
{
strikeTextures[0] = "~/data/enviroment/lightning1";
strikeTextures[1] = "~/data/enviroment/lightning2";
strikeTextures[2] = "~/data/enviroment/lightning3";

strikeSound = LightningHitSound;

thunderSounds[0] = ThunderCrash1Sound;
thunderSounds[1] = ThunderCrash2Sound;
thunderSounds[2] = ThunderCrash3Sound;
thunderSounds[3] = ThunderCrash4Sound;
};

When i browse through the console, i realise the engine is not able to locate the textures. However i'm VERY sure that i have placed them in
"starter.RTS\data\enviroment" and all other textures in the same path worked

#1
12/02/2004 (3:15 am)
Not sure if this is just a typo in your post or your code but you're missing the "n" in environment. That would do it.
#2
12/02/2004 (5:35 am)
No it's not.... i name the folder "enviroment"...
(Sorry poor command of the language)
#3
12/02/2004 (5:46 am)
@Mak: I've had a bit of difficulty in the RTS Starter Kit using "~/some/dir/here", mostly because it can be a bit difficult to figure out what the current "working dir" is. Try changing those lines to something like:

strikeTextures[0] = "starter.RTS/data/enviroment/lightning1";
strikeTextures[1] = "starter.RTS/data/enviroment/lightning2";
strikeTextures[2] = "starter.RTS/data/enviroment/lightning3";

This may help out, although the best solution would be to find the exact relative dir they are in based on your current working dir when you load those textures.
#4
12/02/2004 (6:36 am)
Thank zepp, that's great it works...
#5
12/02/2004 (6:42 am)
Good to hear!

Someday I'm going to figure out how to retrieve the current working dir, so using absolute and relative pathing becomes simpler--for me at least! I know I've run into this in a lot of places.
#6
12/02/2004 (7:24 am)
Question: is Lighting scoped to all clients? ie can everyone see it?
#7
12/06/2004 (3:53 pm)
IIRC it is Anthony, but a quick test would tell you for sure. ;)
#8
12/06/2004 (4:04 pm)
I have and it dose =) but the strikeObject was never implimented. Any one ever finish it?