Frictional Games Forum (read-only)

Full Version: Make monster destory the door
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1. how to make the enemy destory the door? if i Close the door he just stands there, and notice, i only want him to destory the door and dont destory the door and come to me

2. Make the enemy dissappear if he cant find me, it isn't necessary but just to learn something

Sorry, i know i'm annoying xd
(05-26-2013, 07:40 PM)Darkboot Wrote: [ -> ]1. how to make the enemy destory the door? if i Close the door he just stands there, and notice, i only want him to destory the door and dont destory the door and come to me

2. Make the enemy dissappear if he cant find me, it isn't necessary but just to learn something

Sorry, i know i'm annoying xd

1. Make a pathnode thrugh the door and he will break it, then use the functin
SetEntityActive("Nameofthemonster", false);

2. add a timer and use the same function.

hope that was what you asked for.
oh, one of the pathnodes was a Little wrong. it wasn't in the middle and that made him go in the wall.. that why he stood there..

but now he fails to go back to the first pathnode, he goes to the 6:th i Think then when i goes back ge goes in the wall.. i havent put any pathnode there O.o should i set a loop for it to be fixed?
(05-26-2013, 08:06 PM)Darkboot Wrote: [ -> ]oh, one of the pathnodes was a Little wrong. it wasn't in the middle and that made him go in the wall.. that why he stood there..

but now he fails to go back to the first pathnode, he goes to the 6:th i Think then when i goes back ge goes in the wall.. i havent put any pathnode there O.o should i set a loop for it to be fixed?
Yes use a loop and it should work
Thanks Smile

But how do i set up the timer? it works but the seconds O.o i want him to dissappear after 1 minute and if i set 60.f he dissappears after 2 seconds and if i set 1 the same happends :/
(05-26-2013, 08:26 PM)Darkboot Wrote: [ -> ]Thanks Smile

But how do i set up the timer? it works but the seconds O.o i want him to dissappear after 1 minute and if i set 60.f he dissappears after 2 seconds and if i set 1 the same happends :/
{
AddTimer("timername", 60, "function");
}


void function(string &in asTimer)
{
SetEntityActive("monstername", false);
}

That should be it
It works fine when im in that area but if i hide on Another Place he dissappear anyway? How if i want the timer only go when im in the area and not in every dark Place where he cant find me? You understand? Smile
(05-27-2013, 12:42 PM)Darkboot Wrote: [ -> ]It works fine when im in that area but if i hide on Another Place he dissappear anyway? How if i want the timer only go when im in the area and not in every dark Place where he cant find me? You understand? Smile
I make another area on the outside and use a stop timer function, though it will be one minute again when you enter so maybe change that, go to the wiki and search for a function called StopTimer or somethigh similar.
this is it? Smile

float GetTimerTimeLeft(string& asName);

Returns the time left on a timer.

if yes, i guess i should set it at the top and then? i get a error if i only have that