Can't get grunt to spawn upon item pickup - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Can't get grunt to spawn upon item pickup (/thread-23860.html) |
Can't get grunt to spawn upon item pickup - Rob21894 - 11-13-2013 I'm new to hpl2 engine, and still trying to figure out how it works... I am trying to get a grunt to spawn when I pick up an object, Here is the code I've used to try execute this. void OnStart() { SetEntityPlayerInteractCallback("flask01_aqua_regia_1", "Scriptspawnenemy1", true); } void Scriptspawnenemy1(string &in asParent, string &in asChild, int alState) { SetEntityActive("grunt1", true); AddEnemyPatrolNode("Enemy1", "PathNodeArea_1", 0.0, " "); AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 0.0, " "); AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0.0, " "); I have double checked everything to see if im using the correct names, even copy and pasted them into this, I also have a "Script area" called, Scriptspawnenemy1, Where am i going wrong? any help would be appriciated RE: Can't get grunt to spawn upon item pickup - daortir - 11-13-2013 Try (string &in asEntity) instead of (string &in asParent, string &in asChild, int alState) If it works you owe me a cookie :3 This will just mean that the function "Scriptspawnenemy1" is called because of an entity, and not because of two entities colliding. For a function called by a timer you need to write (string &in asTimer), and so on. RE: Can't get grunt to spawn upon item pickup - Rob21894 - 11-13-2013 (11-13-2013, 07:56 PM)daortir Wrote: Try (string &in asEntity) instead of (string &in asParent, string &in asChild, int alState) I owe you one cookie! thanks :3 |