Jump to content


Photo

Builderprob


  • Please log in to reply
7 replies to this topic

#1 TroDuS

TroDuS

    Modding Legend

  • Members
  • 443 posts
  • Location:Rivendell
  •  ambitious Modder (:

Posted 24 June 2010 - 11:18 AM

Hi guys, a few days ago I tried to create a new system of building structures with a porter. But there´s still a problem: I want them to die / or fade out after building a structure. I´ve tried it with using a weapon alike to Word of Power which is just aiming the porter. The Problem is, that all Porter who are in the range of this weapon (which arise after completing a building) are killed by it. So my question is: Have you different possible ideas which make this "system" work? Thanks in advance :p

#2 acidRain

acidRain

    insane programmer

  • Members
  • 79 posts
  • Location:the place that never but always was
  • Projects:personal mods
  •  coder, occasional skinner, and all-around game-breaker

Posted 24 June 2010 - 01:02 PM

Would you mind posting the code you use for the porter-killing weapon? That would probably help...
WWJBD - What Would Jack Bauer Do?

#3 TroDuS

TroDuS

    Modding Legend

  • Members
  • 443 posts
  • Location:Rivendell
  •  ambitious Modder (:

Posted 24 June 2010 - 01:45 PM

Wherefore? I´m just looking for another option to kill or remove the builder from the game after constructing a building.

#4 acidRain

acidRain

    insane programmer

  • Members
  • 79 posts
  • Location:the place that never but always was
  • Projects:personal mods
  •  coder, occasional skinner, and all-around game-breaker

Posted 24 June 2010 - 03:38 PM

Well, adding a RadiusDamageAffects = SELF would probably work, so long as the radius of the weapon damage is equal to 1...that's why I was asking, just to see if you needed to change that.
WWJBD - What Would Jack Bauer Do?

#5 TroDuS

TroDuS

    Modding Legend

  • Members
  • 443 posts
  • Location:Rivendell
  •  ambitious Modder (:

Posted 24 June 2010 - 11:29 PM

Hmm. Why Self? How can I make the builder shoot a weapon immediately after constructing the building? I´ve tried it the other way round: The structure kills the builder after being completed:
Behavior = GrantUpgradeCreate ModuleTag_Givemeuptokill01

		 UpgradeToGrant			= Upgrade_ElvenSpawnKillerBuilder01

		 GiveOnBuildComplete		= Yes

	 End

   

	 Behavior = ObjectCreationUpgrade ModuleTag_Givemeuptokill02

		 TriggeredBy				= Upgrade_ElvenSpawnKillerBuilder01

		 RequiresAllTriggers		= Yes

		 Delay					= 0.0	 

		 ThingToSpawn			= ElvenSpawnKillerBuilder01

		 Offset					= X:0.0 Y:0.0 Z:0.0

		 FadeInTime				= 0

	 End

 

 Object ElvenSpawnKillerBuilder01

 

	 Draw = W3DScriptedModelDraw ModuleTag_01

	 StaticModelLODMode = yes

		 DefaultModelConditionState

			 Model = None

		 End

	 End

 

	 EditorSorting  = SYSTEM

	 KindOf = NO_COLLIDE IMMOBILE UNATTACKABLE INERT

 

; *** ENGINEERING Parameters ***

	 Body = HighlanderBody ModuleTag_02

		 MaxHealth = 1

		 InitialHealth = 1

	 End

  

	 Behavior = FireWeaponUpdate ModuleTag_WeaponFiring

		 FireWeaponNugget

			 WeaponName = KillBuilderSelf

			 Offset = X:0 Y:0 Z:0

			 FireDelay = 0

			 OneShot = No

		 End

	 End

 

	 Behavior = LifetimeUpdate ModuleTag_06

		 MinLifetime = 1000; min lifetime in msec

		 MaxLifetime = 1000; max lifetime in msec

	 End

	  

	 Behavior = SlowDeathBehavior ModuleTag_FadeOut

		 DeathTypes			= ALL

		 DestructionDelay	= 0

	 End

  

	 Geometry = CYLINDER

	 GeometryMajorRadius = 0.0 //17.6

	 GeometryHeight = 0.0 //32.0

	 GeometryIsSmall = No

 End

 

 Weapon KillBuilderSelf

		 AttackRange		  = 50.0

		 RadiusDamageAffects = ALLIES

	 LeechRangeWeapon	  = Yes

	 MeleeWeapon		  = No

	 DelayBetweenShots	= 2000

	 PreAttackDelay		= 0;PreAttackDelay+FiringDuration = UseWeaponTiming = Yes duration

	 PreAttackType		= PER_SHOT

	 FiringDuration		= 0

 

	 DamageNugget

		 Damage		= 0.2

		 DamageScalar		  = 2500000% NONE +ElvenBuilder //KIll nothing except our Porter

		 Radius		= 50.0

		 DelayTime	= 0

		 DamageType	= STRUCTURAL

		 DamageFXType  = FLAME

		 DeathType	= EXPLODED

	 End

 End

Edited by TroDuS, 24 June 2010 - 11:30 PM.


#6 acidRain

acidRain

    insane programmer

  • Members
  • 79 posts
  • Location:the place that never but always was
  • Projects:personal mods
  •  coder, occasional skinner, and all-around game-breaker

Posted 25 June 2010 - 09:21 PM

Oh sorry, thought you were having the BUILDER fire the weapon. If the builder were firing the weapon, then you could just make it suicide (that's the RadiusDamageAffects = SELF part) in a limited radius.

Hm. That's actually pretty clever...except for the fact that the radius will hit every builder inside it. That's why I was thinking have the builder do it.

I THINK...and I haven't tested this, so I don't know...that you could give the builder to the Neutral side immediately after completing the building, and then have the weapon kill all neutral of type ElvenBuilder, but I'm not sure how to implement that. It may be you can only do that in WorldBuilder.

It's an interesting problem; sorry I can't be of any more help than that. Hope you figure something out! :)
WWJBD - What Would Jack Bauer Do?

#7 TroDuS

TroDuS

    Modding Legend

  • Members
  • 443 posts
  • Location:Rivendell
  •  ambitious Modder (:

Posted 26 June 2010 - 07:59 PM

Nice to hear you again acid :)
I will definitely try further different things to establish this system and if I get a solution I will post it here.

#8 Prolong

Prolong
  • Members
  • 133 posts

Posted 29 June 2010 - 03:12 AM

Here is a weird idea, won't work but might give you an idea that will.

When your Porter is given a construct command, have it mount into a new object (like Eowyn Disguise or RotWK Khamul/Morgomir). Then the structure's weapon obviously only kills the "mounted" porter (eg. ElvenPorter_ReadyToDie rather than ElvenPorter).

Problems: mounting would probably cancel the original command. Not sure if you could get that working via commandtrigger either, maybe.


Or here's another idea, maybe you could have your porters doing an attributemodifierauraupdate on themselves, giving them an AM that makes them immune to the type of damage (use an unused damage type) that your structure's weapon does. If you're lucky the AM won't be active in the instant between when it finishes the structure and when the structure weapon comes out. If that doesn't work it could maybe be TriggeredBy an upgrade that gets removed (via commandtrigger?) when you start constructing a structure.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users