Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Scritps question Action_Attack
Scritps question Action_Attack [message #394009] Sun, 05 July 2009 19:08 Go to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

void z_Cinematic_Attack::Created(GameObject *obj)
{
	GameObject *GotoObject = Commands->Find_Object(Get_Int_Parameter("ID"));
	ActionParamsStruct paramd;
	paramd.Set_Basic(this,100,100);
	paramd.Set_Goto_Following(GotoObject,10.0f,50.0f,true);
	Commands->Action_Goto(obj,paramd);

	ActionParamsStruct params;
	int priority = Get_Int_Parameter("Priority");
	float range = Get_Float_Parameter("Range");
	float deviation = Get_Float_Parameter("Deviation");
	int primary = Get_Int_Parameter("Primary");
	params.Set_Basic(this,priority,40016);
	params.Set_Attack_Hold(Commands->Find_Object(Get_Int_Parameter("ID")),range,deviation,primary,false);
	Commands->Action_Attack(obj,params);
}

void z_Cinematic_Attack::Action_Complete(GameObject *obj,int action,ActionCompleteReason reason)
{
	Commands->Action_Reset(obj,100);
}


Is what i am using to get the tank to move into position and attack the object.
But it sits still at the position it is created, it does fire at the object but it doesn't drive over there.

Anyone know a way to get it to move over there?


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: Scritps question Action_Attack [message #394014 is a reply to message #394009] Sun, 05 July 2009 20:06 Go to previous message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

Nevermind, i got it to work now.

void z_Cinematic_Attack::Created(GameObject *obj)
{
	ActionParamsStruct params;
	int priority = Get_Int_Parameter("Priority");
	float range = Get_Float_Parameter("Range");
	float deviation = Get_Float_Parameter("Deviation");
	int primary = Get_Int_Parameter("Primary");
	GameObject *GotoObject = Commands->Find_Object(Get_Int_Parameter("ID"));
	params.Set_Goto_Following(GotoObject,10.0f,50.0f,true);
	Commands->Action_Goto(obj,params);
	params.Set_Basic(this,priority,40016);
	params.Set_Attack_Hold(Commands->Find_Object(Get_Int_Parameter("ID")),range,deviation,primary,false);
	Commands->Action_Attack(obj,params);
}

void z_Cinematic_Attack::Action_Complete(GameObject *obj,int action,ActionCompleteReason reason)
{
	Commands->Action_Reset(obj,100);
}


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Previous Topic: animated westwood screens
Next Topic: Textures =(
Goto Forum:
  


Current Time: Sat Dec 21 09:34:09 MST 2024

Total time taken to generate the page: 0.00672 seconds