Jump to content

Raptor Alpha

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Raptor Alpha

  • Rank
    Rookie
  1. Hello, can anyone tell me why when I spawn a task dynamically with Script, Actually it's generated by the game mode when m_fTimeElapsed > 30 locally I see only one task but in peer tool the remote player sees 3 destroy type tasks. I proceed as follows: I spawn prefab with : Area Layer SlotDestroy Something's : The Good Quests spawn, Some time after the quest spawn (Like when world update), Other quest appear with destroy task (the good one is a Destroy Task Too) But with basic name and descriptions and postion 0,0,0 What i'm missing ? The goal is only to spawn task , automatically but i'm missing somethings in the init ? Thank's for your help Resource TaskArea = Resource.Load("{5A846609024151B6}Prefabs/Utils/Area_Dev.et"); EntitySpawnParams params = EntitySpawnParams(); params.TransformMode = ETransformMode.WORLD; params.Transform[3] = position; IEntity area = IEntity.Cast(GetGame().SpawnEntityPrefab(TaskArea, null, params)); string taskname = "Mission" + m_TaskNumber; m_TaskNumber++; area.SetName(taskname); SCR_ScenarioFrameworkArea ThisArea = SCR_ScenarioFrameworkArea.Cast(area.FindComponent(SCR_ScenarioFrameworkArea)); IEntity Child = area.GetChildren(); SCR_ScenarioFrameworkLayerTask ThisLayerTask = SCR_ScenarioFrameworkLayerTask.Cast(Child.FindComponent(SCR_ScenarioFrameworkLayerTask)); IEntity ChildSlot = Child.GetChildren(); SCR_ScenarioFrameworkSlotDestroy ThisSlot = SCR_ScenarioFrameworkSlotDestroy.Cast(ChildSlot.FindComponent(SCR_ScenarioFrameworkSlotDestroy)); SCR_GameModeSFManager manager = SCR_GameModeSFManager.Cast(GetGame().GetGameMode().FindComponent(SCR_GameModeSFManager)); ThisArea.SetLayerTask(ThisLayerTask); //manager.GenerateTasks(); ThisArea.Init(); ThisLayerTask.Init(); ThisSlot.Init();
  2. Hello, can anyone tell me why when I spawn a task dynamically with Script, Actually it's generated by the game mode when m_fTimeElapsed > 30 locally I see only one task but in peer tool the remote player sees 3 destroy type tasks. I proceed as follows: I spawn prefab with : Area Layer SlotDestroy Something's : The Good Quests spawn, Some time after the quest spawn (Like when world update), Other quest appear with destroy task (the good one is a Destroy Task Too) But with basic name and descriptions and postion 0,0,0 What i'm missing ? The goal is only to spawn task , automatically but i'm missing somethings in the init ? Thank's for your help Resource TaskArea = Resource.Load("{5A846609024151B6}Prefabs/Utils/Area_Dev.et"); EntitySpawnParams params = EntitySpawnParams(); params.TransformMode = ETransformMode.WORLD; params.Transform[3] = position; IEntity area = IEntity.Cast(GetGame().SpawnEntityPrefab(TaskArea, null, params)); string taskname = "Mission" + m_TaskNumber; m_TaskNumber++; area.SetName(taskname); SCR_ScenarioFrameworkArea ThisArea = SCR_ScenarioFrameworkArea.Cast(area.FindComponent(SCR_ScenarioFrameworkArea)); IEntity Child = area.GetChildren(); SCR_ScenarioFrameworkLayerTask ThisLayerTask = SCR_ScenarioFrameworkLayerTask.Cast(Child.FindComponent(SCR_ScenarioFrameworkLayerTask)); IEntity ChildSlot = Child.GetChildren(); SCR_ScenarioFrameworkSlotDestroy ThisSlot = SCR_ScenarioFrameworkSlotDestroy.Cast(ChildSlot.FindComponent(SCR_ScenarioFrameworkSlotDestroy)); SCR_GameModeSFManager manager = SCR_GameModeSFManager.Cast(GetGame().GetGameMode().FindComponent(SCR_GameModeSFManager)); ThisArea.SetLayerTask(ThisLayerTask); //manager.GenerateTasks(); ThisArea.Init(); ThisLayerTask.Init(); ThisSlot.Init();
  3. Hello, I would like to know how to reset a trigger. I created a CP_ActionBase class to randomly choose a mission. It starts on a trigger, but I would like this one to reset at the end of the mission. Knowing that the triggers is always active since it takes the whole map for the first trigger. Thanks
×