The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any way to loop a AddEntityCollideCallback?
theabcs Offline
Junior Member

Posts: 5
Threads: 2
Joined: Apr 2012
Reputation: 0
#1
Any way to loop a AddEntityCollideCallback?

Here is my script:

void scare(string &in asParent, string &in asChild, int alState) {
AddLocalVarInt("arm", 1);
if(GetLocalVarInt("arm") == 10){

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);

GiveSanityDamage(10.0f, true);
SetSwingDoorClosed("door2", true, true);
SetEntityActive("grunt2", true);

AddEnemyPatrolNode("grunt2", "PathNodeArea_17", 0, "idle");
AddEnemyPatrolNode("grunt2", "PathNodeArea_18", 0, "idle");
AddEnemyPatrolNode("grunt2", "PathNodeArea_19", 0, "idle");
AddEnemyPatrolNode("grunt2", "PathNodeArea_20", 0, "idle");
AddEnemyPatrolNode("grunt2", "PathNodeArea_21", 0, "idle");
AddEnemyPatrolNode("grunt2", "PathNodeArea_22", 0, "idle");
AddTimer("monster1", 30.0f, "gleave");
}
}


Is there any way to loop the script so that even if the script has been used, it can be reset/reused? The script works fine in game, however it is a one time deal and I would like it to be reusable multiple times.
(This post was last modified: 04-04-2012, 10:55 PM by theabcs.)
04-04-2012, 10:29 PM
Find


Messages In This Thread
Any way to loop a AddEntityCollideCallback? - by theabcs - 04-04-2012, 10:29 PM



Users browsing this thread: 1 Guest(s)