logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,643
Total Threads: 8,744
Posts: 95,519

Administrators:
DeeZire, Redemption

There are currently 32 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements

DeeZire Online > Editing Community > Command and Conquer Editing > Generals & Zero Hour Editing » HELP: Rebel 2 weapons with SWITCH_Weapon, 3 suicide. How to?

Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 02-19-2006, 04:06 PM   #1 (permalink)
Junior Member
 
Join Date: Jan 2006
Posts: 9
Default HELP: Rebel 2 weapons with SWITCH_Weapon, 3 suicide. How to?

Hello everyone. I'am pretty new to modding and started learning a few weeks ago. Now I'am running into a problem.

What do I have in mind?
I would like to have a GLA rebel with two weapons and who can commit suicide. I would like to be able to switch between the two weapons.
The rebel has by default the RebelMachineGun. By upgrade it can purchase a MolotovCocktail. Suicide is the third weapon.

How far did I get?
With the SWITCH_WEAPON option in CommandButton.ini I'am able to switch between the two weapons. In myfaction.ini I inserted the code for suicide.

What are my problems?
1. After purchasing both upgrades and I build a rebel, by default the suicide option works.
But when I first use one of the switches for switching weapon and then using the suicide option something strange happens.
The rebel doesn't commit suicide but starts firing with the last chosen weapon from SWITCH_WEAPON. The rebel doesn't uses its third weapon.

2. When I build a rebel and target him to destroy something, per example his own barrack, and I did not use one of the switches for choosing a weapon, the rebel start using both weapons. In the command GUI both icons from the SWITCH_WEAPON options flash on and off.


What does the code look like?
################################################## #####
CommandButton.ini
################################################## #####
.
.
CommandButton Command_InfOnly_RebelSwitchToMachineGun
Command = SWITCH_WEAPON
WeaponSlot = PRIMARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:RebelMachineGun
ButtonImage = SSArmMob
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSwitchToRebelMachineGun
UnitSpecificSound = RebelVoiceAttack
End

CommandButton Command_InfOnly_RebelSwitchToCocktail
Command = SWITCH_WEAPON
WeaponSlot = SECONDARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT NEED_UPGRADE
Upgrade = Upgrade_InfOnlyGLAInfantryRebelMolotovCocktail
TextLabel = CONTROLBAR:MolotovCocktail
ButtonImage = AngryMobFireBomb
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:ToolTipSwitchToRebelMolotovCocktail
UnitSpecificSound = RebelVoiceAttack
End

CommandButton Command_InfOnly_TertiarySuicide
Command = FIRE_WEAPON
WeaponSlot = TERTIARY
Options = OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:SuicideAttack
ButtonImage = SUSuicideAttk
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLASuicideAttack
End
.
.

################################################## #####
Faction.ini
################################################## #####
object GLARebel
.
.
DefaultConditionState
Model = UIRGrd_SKN
IdleAnimation = UIRGrd_SKL.UIRGrd_STN 0 35
IdleAnimation = UIRGrd_SKL.UIRGrd_IDA
IdleAnimation = UIRGrd_SKL.UIRGrd_IDB
AnimationMode = ONCE
WeaponLaunchBone = PRIMARY Muzzle
WeaponFireFXBone = PRIMARY Muzzle
WeaponMuzzleFlash = PRIMARY MuzzleFX
WeaponFireFXBone = SECONDARY Muzzle
WeaponLaunchBone = SECONDARY Muzzle
TransitionKey = TRANS_Standing
End
.
.
WeaponSet
Conditions = None
Weapon = PRIMARY GLARebelMachineGun
Weapon = SECONDARY NONE
Weapon = TERTIARY TerroristSuicideNotARealWeapon
AutoChooseSources = TERTIARY NONE
End

WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY GLARebelMachineGun
Weapon = SECONDARY InfOnly_GLARebelMolotovCocktail
Weapon = TERTIARY TerroristSuicideNotARealWeapon
AutoChooseSources = PRIMARY FROM_SCRIPT FROM_AI DEFAULT_SWITCH_WEAPON
AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI
AutoChooseSources = TERTIARY NONE
End

Behavior = WeaponSetUpgrade ModuleTag_10
TriggeredBy = Upgrade_InfOnlyGLAInfantryRebelMolotovCocktail
End

Behavior = CommandSetUpgrade ModuleTag_60
CommandSet = InfOnly_GLAInfantryRebelCommandSetUpgrade
TriggeredBy = Demo_Upgrade_SuicideBomb
End
.
.
################################################## #####

Possible solution for problem 1?
Make the third weapon the third in the row for SWITCH_WEAPON. Change CommandButton.ini like this:

CommandButton Command_InfOnly_TertiarySuicide
Command = SWITCH_WEAPON
WeaponSlot = TERTIARY
Options = CHECK_LIKE OK_FOR_MULTI_SELECT
TextLabel = CONTROLBAR:SuicideAttack
ButtonImage = SUSuicideAttk
ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is
DescriptLabel = CONTROLBAR:ToolTipGLASuicideAttack
End

By this way I 'MUST' target the rebel first before it commits suicide, Just like the terrorist. It doesn't commit suicide at the current location.

Problem 1:
How to solve the problem that I can use the SWITCH_WEAPON option and commit suicide?

Problem 2:
I've been playing with AutoChooseSources = PRIMARY FROM_SCRIPT FROM_AI DEFAULT_SWITCH_WEAPON. Tried different entries like FROM_SCRIPT, FROM_AI and FROM_PLAYER for PRIMARY, SECONDARY en TERTIARY but I'am looking for a needle in a haystack.

Who can help me out?

Thanks in advance.
mrdasher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-20-2006, 06:53 AM   #2 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default

ok. first add this line into the WeaponSet:

"WeaponLockSharedAcrossSets = Yes"
(this un/pauses the primary, secondary weapon when you switch them)


then add this module to your rebel:

Behavior = LockWeaponCreate ModuleTag_LockWeapon
SlotToLock = PRIMARY ;your GLARebelMachineGun WeaponSlot
End

And then try it and post again if it doesn't work.
Greetz Dibelius
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-20-2006, 03:22 PM   #3 (permalink)
Junior Member
 
Join Date: Jan 2006
Posts: 9
Default

Thanks oder danke, Dibelius. I did notice the code for WeaponLockSharedAcrossSets but I assumed that the lock was created by DEFAULT_SWITCH_WEAPON at the AutoChooseSources. I didn't look for 'Lock' on the ranger code.

Okay now we have solved one problem. The problem of the flashing icons on the command GUI disappeared and the rebel is now using one weapon, because the lock is created by the behavior code.

The code for committing suicide is still a problem. The behaviour I noticed is still the same. Pressing the button for suicide does the rebel firing the last choosen weapon. The rebel even isn't able to commit suicide anymore.

In the meantime I already tested with a lot of combinations with:
AutoChooseSources = TERTIARY <...>
where <...> is a combination of one or more entries NONE, FROM_SCRIPT, FROM_AI, FROM_PLAYER. And even tested with PRIMARY and SECONDARY.

I haven't found a working one yet...
mrdasher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-21-2006, 08:01 AM   #4 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default

ok kein Problem

here's the method the demolition general uses for its terror units after upgrading the suicide death. I took an example of the rebel:

Code:
  WeaponSet
    Conditions = None 
    <...>
    Weapon = TERTIARY TerroristSuicideNotARealWeapon
    AutoChooseSources = TERTIARY NONE
  End
now to the weapon.ini (a dummy weapon that does no damage at all to enemies but kills the rebel)

Code:
;------------------------------------------------------------------------------
; This weapon kills itself (to presumably trigger detonations on death)
; WITHOUT BEING PERMITTED TO TARGET ENEMIES WITH IT!!!!
Weapon TerroristSuicideNotARealWeapon
  LeechRangeWeapon = Yes
  AttackRange = 0.0
  PrimaryDamage = 0.0            
  PrimaryDamageRadius = 0.0      
  DamageDealtAtSelfPosition = Yes
  RadiusDamageAffects = SUICIDE
  DamageType = EXPLOSION
  DeathType = SUICIDED
  WeaponSpeed = 99999.0             
  DelayBetweenShots = 0              
  ClipSize = 1                        
  ClipReloadTime = 0                  
  AutoReloadsClip = No
End
back to the rebel code. The suicide weapon kills him and the module fires the real damage weapon. (If you don't need any upgrade to grant the suicide death, comment out "TriggeredBy" and change "StartsActive = No" into Yes)

Code:
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_SuicideBomb01
    DeathWeapon   = Demo_SuicideDynamitePackPlusFire
    StartsActive  = No
    TriggeredBy   = Demo_Upgrade_SuicideBomb
    DeathTypes = ALL
  End
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_SuicideBomb02
    DeathWeapon   = Demo_SuicideDynamitePackPlusFire
    StartsActive  = No
    TriggeredBy   = Demo_Upgrade_SuicideBomb
    DeathTypes = NONE 
  End
Last but not least the real damage weapon in wepaon.ini

Code:
;------------------------------------------------------------------------------
Weapon Demo_SuicideDynamitePackPlusFire
  PrimaryDamage = 500.0
  PrimaryDamageRadius = 18.0
  SecondaryDamage = 300.0
  SecondaryDamageRadius = 50.0
  AttackRange = 5.0
  DamageType = EXPLOSION
  DeathType = SUICIDED
  WeaponSpeed = 99999.0             
  ProjectileObject = NONE
  DamageDealtAtSelfPosition = Yes
  RadiusDamageAffects = SELF SUICIDE ENEMIES NEUTRALS NOT_SIMILAR
  DelayBetweenShots = 0              
  ClipSize = 1                        
  ClipReloadTime = 0                  
  AutoReloadsClip = No 
  FireFX = WeaponFX_DemoSuicideDynamitePackDetonationPlusFire
  FireSound = CarBomberDie
End
ok I hope I could help so far. I also learned from this small research for a similiar problem for my mod
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-21-2006, 04:52 PM   #5 (permalink)
Junior Member
 
Join Date: Jan 2006
Posts: 9
Default

Dibelius, thank you again for your feedback. I would like to remember that I already inserted the Suicide code and it worked before, but not the way I wan't it to. Before I inserted the weaponlock it worked as long as I did not choose a weapon.

To start with Faction.ini, I already inserted WeaponSet TERTIARY weapon and tested with different settings for AutoChooseSources.

I inserted this code, got it from demolition general:
Behavior = FireWeaponWhenDeadBehavior ModuleTag998
DeathWeapon = Demo_SuicideDynamitePackPlusFire
StartsActive = No
TriggeredBy = Demo_Upgrade_SuicideBomb
DeathTypes = NONE +SUICIDED
End;

Behavior = FireWeaponWhenDeadBehavior ModuleTag999
DeathWeapon = Demo_DestroyedWeapon
StartsActive = No
TriggeredBy = Demo_Upgrade_SuicideBomb
DeathTypes = ALL -SUICIDED
End

In weapon.ini I did not change a thing concerning the weapons TerroristSuicideNotARealWeapon and
Demo_SuicideDynamitePackPlusFire

I also did some deeper research. I went looking for units with three weapons and which can commit suicide. I pinpointed to the demolition general because they all can commit suicide. Units with three weapons are:
- Jarmen Kell;
- Scorpion;
- Quad cannon;
- Toxin Truck;
- Battle Bus.

I researched Jarmen Kell and Toxin Truck because Jarmen can use the Snipe Driver in a vehicle and the Toxin Truck can spray toxin. To activate these weapons you push the right button on the command GUI. They have a PRIMARY weapon for 'normal' use and a SECONDARY which you have to point to a target/area and then activate the weapon. When you look in CommandButton.ini for these buttons you can see they have the FIRE_WEAPON as command and not the SWITCH_WEAPON.

I would like to use a combination of these but will this work? Need to dig a bit deeper on the forum. I can't imagine that I'am the first with this idea...
mrdasher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-22-2006, 04:22 PM   #6 (permalink)
Junior Member
 
Join Date: Jan 2006
Posts: 9
Default

Ahhh, found this on the forum:

http://www.deezire.net/modules.php?n...ertiary+weapon

Same idea here and not solved. Anyone any ideas if this is possible?
mrdasher is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-22-2006, 05:33 PM   #7 (permalink)
Senior Member
 
Join Date: Jun 2003
Location: Germany
Posts: 363
Send a message via ICQ to Dibelius
Default

lol. one more topic that was ignored cleverly in the past...

hmm when I read this I started thinking that it could be more difficulty than I thought if it's possible. :/
What happens if your suicide weapon that you control via a FIRE_WEAPON button is not TERTIARY but PRIMARY weapon and the other two SECONDARY and TERTIARY ? (of course u must change the LockWeaponCreate module and what is linked to the old slots). it's just an idea, I'm not sure if this has any effect.
Dibelius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rebel ambush coding error Hostile Generals & Zero Hour Editing 7 09-07-2004 04:52 PM
Suicide Plane Granger Generals & Zero Hour Editing 9 05-18-2004 03:56 PM
Us Ranger with GLA Rebel Animation ? :> Ilikemyname Generals & Zero Hour Editing 7 02-05-2004 07:11 PM
GLA Rebel Added Ability HateCorp Generals & Zero Hour Editing 3 10-17-2003 10:50 PM
Old Rebel in the Intro? eric Generals & Zero Hour Editing 4 04-25-2003 03:05 AM


All times are GMT -4. The time now is 11:22 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.