Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Faron

Delete locked Entity

Recommended Posts

Hello there,

 

I want to delete a preplaced locked map object.

 

Basically I wanted to put a destroy task on an antenna. Therefore I created a new destroy slot and created a new antenna object, which I linked to the destroy slot (works fine). Now I want to replace the locked antenna with my newly created one.

 

I've had the idea to place a trigger at the objects position, make it trigger only for AntennaR404_01 objects and have it to delete those.

 

I tried to achieve this by modifying the trigger's onActivate.

 

class TriggerTest_Class: SCR_ScenarioFrameworkTriggerEntity 
{
	override void OnActivate(IEntity ent)
	{
		SCR_EntityHelper.DeleteEntityAndChildren(ent);
	}

};

This is giving me some kind of null pointer exception

 

Quote

Virtual Machine Exception

 

Reason: NULL pointer to instance

 

Class: 'SCR_ScenarioFrameworkTriggerCountdownDisplay'

Function: 'DisplayStartDraw'

Stack trace:

Scripts/Game/UI/ScenarioFramework/SCR_ScenarioFrameworkTriggerCountdownDisplay.c:23 Function DisplayStartDraw

 

I'm quite experienced in scripting in Arma 3, yet Reforger is totally confusing me.

 

How is this working? The more I read within the Arma Reforger Script API the more desperate I get.

Share this post


Link to post
Share on other sites

×