Hi Guys. Two questions...
a) Is there any way, to turn a world model, or level geometry into an entity with an entityname. I want my scripted player to go into the "swim" order when he collides with my water model using the GetFastDistance command. So far I have used a trigger entity and the GetEventState command (which works fine), but the problem is when enemy pawns make contact with the water, they set the trigger off and my player pawn begins to swim on dry land.
b) Why does the wavy effect not work on world models with a Liquid entity attached to them. Is there a way around this?
Swimming
Re: Swimming
I am not sure if it has been implemented into the 'official build' but in my community releases i have implemented a command IsInLiquid() that checks if the pawn is inside a Liquid world model (i mean a model that has been assigned to the Liquid entity) and if yes, it returns the entity name of that Liquid entity... This is exactly for thinghs like that...
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
Re: Swimming
Thanks Jay. I used this command in my script in RF 076. It doesn't crash or return any errors, but it doesn't have any effect... here is how I have written it:
if(IsInLiquid())
{
AnimateBlend(SWIMIDLE,0.1);
self.think="Swim";
}
}]
}
Any suggestions?
Does anyone know if rf076 supports this script command?
if(IsInLiquid())
{
AnimateBlend(SWIMIDLE,0.1);
self.think="Swim";
}
}]
}
Any suggestions?
Does anyone know if rf076 supports this script command?
A good warrior knows his limits, but a great warrior finds his way around them.
Re: Swimming
Yes, it supports.Masta_J wrote:Does anyone know if rf076 supports this script command?
Posting the whole script, or perhaps the main parts that deal with swimming would help in finding the problem.
***EDIT***
You can use 'debug(IsInLiquid());' to see if the pawn is considered to be in liquid or not.
Pain is only psychological.
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
Re: Swimming
It's easy.bool IsInLiquid();
Tests if the Pawn is inside a Liquid Entity.
string GetLiquid();
Returns the name of the Liquid Entity the Pawn is in. Returns an empty string ("") if the Pawn is not inside a Liquid
All you need is the manual, all you need is the manual,
All you need is the manual, the manual, the manual is all you need.
The manual, manual, manual, manual, manual, manual, manual, manual, manual.
All you need is the manual, all you need is the manual,
All you need is the manual, the manual, the manual is all you need.
(freely adapted from All you need is love )
Re: Swimming
Thanks guys! IsInLiquid() works perfectly. I actually assigned my Liquid entity to the wrong world model is why I couldn't get it to work in the first place
Does anyone know the answer to my second question? Why does the wavy effect in the Brush attributes tab not take effect on world models with a Liquid entity assigned to them? My aim is to make a model that has the Liquid and Echaos entities attached with the brush attributes wavy effect...
Does anyone know the answer to my second question? Why does the wavy effect in the Brush attributes tab not take effect on world models with a Liquid entity assigned to them? My aim is to make a model that has the Liquid and Echaos entities attached with the brush attributes wavy effect...
A good warrior knows his limits, but a great warrior finds his way around them.