GetGroundTexture().. Not sure how to use....

Topics regarding Scripting with Reality Factory
Post Reply
rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

GetGroundTexture().. Not sure how to use....

Post by rgdyman » Sun Jul 24, 2005 11:52 pm

I have a quick ( possiably an easy) question about the LowLevel command
GetGroundTexture();

I'm tring to use this with a ( if ) factor.

GetGroundTexture();
if(GetGroundTexture("Grass.bmp")) // I also tried ( "Grass" ) with no .bmp
{
Do cool stuff. :?
}

I don't seem to be using this the right way. Nothing is happening
when the pawn walks over the brush with the texture.

Could anyone give me an example how to use this feature?

Thanks a million. :D

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams » Mon Jul 25, 2005 12:05 am

GetGroundTexture does not take any parameters it just returns the name of the current texture beneath the pawn
if I remember correctly it should work like this

Code: Select all

TEXTURE    [Grass]

if(GetGroundTexture() = TEXTURE)
{
    //do cool stuff
}

rgdyman
Posts: 84
Joined: Tue Jul 05, 2005 7:05 am

Post by rgdyman » Mon Jul 25, 2005 12:32 am

Cool :P

What I did was this:

TEXTURE []


TEXTURE=GetGroundTexture();
if(TEXTURE="Grass")
{
PlaySound(Grass_Walk.wav");
}

Thaks for the push Quest!!

hike1
RF FAQ-Keeper
Posts: 607
Joined: Tue Jul 05, 2005 4:19 am
Contact:

Post by hike1 » Mon Jul 25, 2005 4:26 am

Demo072e (1.5MB)- Ingame map, different foot sounds, displacement and bump maps in Gimp, keeping scripts from running.

http://terrymorgan.net/download.htm

Post Reply