CnC Source Forums: samsite help! - CnC Source Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

samsite help! Rate Topic: -----

#1 User is offline   Madin 

  • Rocket Soldier
  • Group: Members
  • Posts: 76
  • Joined: 01-January 07

Posted 26 March 2009 - 05:37 PM

Here we go again!
I have a very basic Nod sam site done in the old Tiberian dawn style. The default state of the sam site is retracted into the ground, the actual sam only appears when it detects an enemy aircraft.
I have a 2 stage model ( A concrete base with sliding doors & the main sam turret ), each with there own animations and xml 'scripted model draw' (So far I've only done the build up animation).

What I'd like:
1. I'd like the sam site to only appear to fire at an enemy aircraft, how would I do this?
2. I'd like for the sam site to have a pre-aiming system that detects aircraft outside the actual sam missile range, thereby triggering the sam 'deploy' state. So that the sam site is already in the fire position once the enemy craft is in weapon range.
3. I'd like the 'retracted' state to have more health than the 'deployed' state. I also want them to share the damage (like the rig/battle base, MCV/construction yard).

Any help would be appreciated!
0

#2 User is offline   Colm (Waraddict) 

  • Leader of Tiberian Dawn: Coding Manager, TFTW Team leader
  • Group: Network Leader
  • Posts: 644
  • Joined: 13-September 04

Posted 27 March 2009 - 01:17 PM

View PostMadin, on Mar 27 2009, 12:37 AM, said:

Here we go again!
I have a very basic Nod sam site done in the old Tiberian dawn style. The default state of the sam site is retracted into the ground, the actual sam only appears when it detects an enemy aircraft.
I have a 2 stage model ( A concrete base with sliding doors & the main sam turret ), each with there own animations and xml 'scripted model draw' (So far I've only done the build up animation).

What I'd like:
1. I'd like the sam site to only appear to fire at an enemy aircraft, how would I do this?
2. I'd like for the sam site to have a pre-aiming system that detects aircraft outside the actual sam missile range, thereby triggering the sam 'deploy' state. So that the sam site is already in the fire position once the enemy craft is in weapon range.
3. I'd like the 'retracted' state to have more health than the 'deployed' state. I also want them to share the damage (like the rig/battle base, MCV/construction yard).

Any help would be appreciated!


Dont have much time to explain at the moment but do get you started until I do:

What you need:
SAM Model
Animation of the SAM opening and popping out its turret
Juggernaught deploy logic
scissors
and some sticky tape! :P

Sorry for the short explanation and tasteless humour but I will get back to you to explain better, at this moment you're probably wondering where do you get the shooting model so for now I'll just tell you there's a way to use a specific frame of an animation for a model, as for popping back in, you can reverse an animation as well without needing to create it.
0

#3 User is offline   Krit 

  • Elegant Staff Member
  • Group: Network Moderator
  • Posts: 539
  • Joined: 19-September 04

Posted 27 March 2009 - 10:23 PM

Considering the part of it deploying before the target actually comes into range; couldn't that be done with a dummy weapon that has a longer range than the missiles weapons themselves?
0

#4 User is offline   Madin 

  • Rocket Soldier
  • Group: Members
  • Posts: 76
  • Joined: 01-January 07

Posted 29 March 2009 - 03:33 AM

View PostWaraddict, on Mar 27 2009, 08:17 PM, said:

Dont have much time to explain at the moment but do get you started until I do:

What you need:
SAM Model
Animation of the SAM opening and popping out its turret
Juggernaut deploy logic
scissors
and some sticky tape! :P

Sorry for the short explanation and tasteless humour but I will get back to you to explain better, at this moment you're probably wondering where do you get the shooting model so for now I'll just tell you there's a way to use a specific frame of an animation for a model, as for popping back in, you can reverse an animation as well without needing to create it.

The firing state is not turning to face the target. This is really irritating.
0

#5 User is offline   Slye_Fox 

  • Chem Warrior
  • Group: VIP Member
  • Posts: 92
  • Joined: 02-November 04

Posted 29 March 2009 - 08:48 AM

did you give the fireing state a turret?
0

#6 User is offline   Madin 

  • Rocket Soldier
  • Group: Members
  • Posts: 76
  • Joined: 01-January 07

Posted 29 March 2009 - 11:41 AM

View PostSlye_Fox, on Mar 29 2009, 03:48 PM, said:

did you give the firing state a turret?

Do I need a firing state model condition.
I have a 'DEPLOYED' animation state (similar to the Juggernaut.) along with 'PACKING'/'UNPACKING' state.
I only have a 'PARSE_DEFAULT' & PARSE_NORMAL, condition state STRUCTURE_UNPACKING model conditions.
0

#7 User is offline   Madin 

  • Rocket Soldier
  • Group: Members
  • Posts: 76
  • Joined: 01-January 07

Posted 30 December 2009 - 02:42 PM

View PostWaraddict, on 27 March 2009 - 01:17 PM, said:

Dont have much time to explain at the moment but do get you started until I do:

What you need:
SAM Model
Animation of the SAM opening and popping out its turret
Juggernaught deploy logic
scissors
and some sticky tape! :P

Sorry for the short explanation and tasteless humour but I will get back to you to explain better, at this moment you're probably wondering where do you get the shooting model so for now I'll just tell you there's a way to use a specific frame of an animation for a model, as for popping back in, you can reverse an animation as well without needing to create it.

So I've had a second go at getting this to work, still no joy!
Could really do with some advice on this!
0

#8 User is offline   Slye_Fox 

  • Chem Warrior
  • Group: VIP Member
  • Posts: 92
  • Joined: 02-November 04

Posted 02 January 2010 - 10:12 AM

Posted Image
0

#9 User is offline   Colm (Waraddict) 

  • Leader of Tiberian Dawn: Coding Manager, TFTW Team leader
  • Group: Network Leader
  • Posts: 644
  • Joined: 13-September 04

Posted 02 January 2010 - 03:55 PM

This is the model code for the Tiberian Dawn mod SAM Site

The model NBTSmSt has an animation that starts with the SAM underground and ends with it above ground, you don't need anything else as
you can reverse an animation through coding.

		<Draws>
			<scriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true"
				ExtraPublicBone="RocketLaunch01 RocketLaunch02 RocketLaunch03 RocketLaunch04 RocketLaunch05 RocketLaunch06">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="NBTSmSt" />
					<WeaponFireFXBone
						WeaponSlotType="PRIMARY_WEAPON"
						WeaponSlotID="1"
						BoneName="RocketLaunch" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="UNPACKING">
					<Model
						Name="NBTSmSt" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="PACKING">
					<Model
						Name="NBTSmSt" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DEPLOYED">
					<Model
						Name="NBTSmSt" />
					<WeaponFireFXBone
						WeaponSlotType="PRIMARY_WEAPON"
						WeaponSlotID="1"
						BoneName="RocketLaunch" />
					<Turret
						TurretNameKey="TURRET"
						TurretPitch="Turretel"
						TurretID="1" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					Flags="START_FRAME_FIRST"
					ConditionsYes="UNPACKING">
					<Animation
						AnimationName="NBTSmSt"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="PACKING"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="NBTSmSt"
						AnimationMode="ONCE_BACKWARDS" />
				</AnimationState>	
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DEPLOYED"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="NBTSmSt"
						AnimationMode="MANUAL" />
				</AnimationState>	
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="NBRDefense_D2SN" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="NBTSmSt" />
				</ModelConditionState>

			</ScriptedModelDraw>
		</Draws>


You also need an AI module similar to the Juggarnaught's

			<DeployStyleAIUpdate
				id="ModuleTag_AI"
				AutoAcquireEnemiesWhenIdle="YES"
				AILuaEventsList="GDIJuggernaughtFunctions"
				UnpackTime="1.7s"
				PackTime="1.7s"
				MustDeployToAttack="true">
				<UnitAITargetChooserData
					CheckVisionRange="false"
					CanPickDynamicTargets="false"
					RotateToTargetWhenAiming="false" />
			</DeployStyleAIUpdate>


Hopefully that helps
0

#10 User is offline   Madin 

  • Rocket Soldier
  • Group: Members
  • Posts: 76
  • Joined: 01-January 07

Posted 04 January 2010 - 01:15 PM

You are an outstanding human being!
thank you very much! -_-
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users