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

Forum Info
Forum Members: 18,642
Total Threads: 8,744
Posts: 95,508

Administrators:
DeeZire, Redemption

There are currently 33 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


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

Reply
 
LinkBack Thread Tools
Old 08-05-2003, 03:53 PM   #1 (permalink)
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 303
Default Forcing weapon use

Hi!

At the moment I am trying to create a new tank for generals. I want it to have a gun, a machine gun and and AT missile launcher. For now I only want to know whether I can force the unit and/or Generals to use a specific weapon only against say infantry (that would then be the machine gun) and use another weapon, e.g. the AT missile, only against tanks and vehicles.

I tried the following lines of code (copied from the Comanche) and changed for my tank:

WeaponSet
Conditions = None
; -----
Weapon = PRIMARY ScorpionTankGun
PreferredAgainst = PRIMARY VEHICLE STRUCTURE
; -----
Weapon = SECONDARY BMP3MissileWeapon
PreferredAgainst = SECONDARY VEHICLE STRUCTURE
; -----
Weapon = TERTIARY CrusaderMachineGun
PreferredAgainst = TERTIARY INFANTRY
End

The Secondary Weapon is simply the Humvee Weapon with another name. All weapons work and are shown correctly ingame but I want the unit to attack tanks and buildings with its gun and the missile and NOT with the machine gun and on the other hand I want it to attack infantry with the machine gun only.

Is this possible?

I appreciate any help and I'm looking forward to answers.

See you, HEXman
2312222 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2003, 04:01 PM   #2 (permalink)
Senior Member
 
Join Date: Jun 2003
Posts: 415
Default

yes, I tried that once in a tank, but the funny thing is when I attack an infantry, the cannon recoils with machine gun rounds, looks weird though, the code works, but maybe you might want to create another bone for the machine gun rounds so it wouldn't fire using the cannon only frag rounds
Indigo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-05-2003, 05:20 PM   #3 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: UK
Posts: 676
Send a message via MSN to DJRowley
Default

This code works


WeaponSet
Conditions = None
; -----
Weapon = PRIMARY HammerheadRailgun
PreferredAgainst = PRIMARY VEHICLE STRUCTURE
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
; -----
Weapon = SECONDARY BurstCannon
PreferredAgainst = SECONDARY INFANTRY
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
End



I think your problem is that you have two weapons set to the same "PreferredAgainst=" type.....thing.
DJRowley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2003, 08:01 AM   #4 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: UK
Posts: 676
Send a message via MSN to DJRowley
Default

Indigo, i think this code will solve your problem:

Behavior = AIUpdateInterface ModuleTag_03
Turret
TurretTurnRate = 135 ;60 // turn rate, in degrees per sec
ControlledWeaponSlots= PRIMARY
End
AutoAcquireEnemiesWhenIdle = Yes
End


Make sure you change the machine to the secondary weapon and the tank gun to the primary.
DJRowley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-06-2003, 10:45 AM   #5 (permalink)
Senior Member
 
Join Date: Jul 2003
Posts: 342
Default

dude i know how u can disable it using its machine gun on tanks , just do this in the weapon ini change this :
DamageType = FLESHY_SNIPER
DeathType = NORMAL
and if u want it to use only its machinegun on infantry make sure the machine gun range is a little higher as the gun range
pieten 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
Forcing the AI to build buildings at specific cells DysproS Red Alert 2 & Yuri's Revenge Editing 5 10-21-2005 05:11 AM
Forcing units to enter a certain place on the model Hostile Generals & Zero Hour Editing 2 05-12-2005 07:45 AM
Bunker Buster forcing stuff out of tunnels CodeCat Generals & Zero Hour Editing 16 02-22-2005 02:35 PM
how to make weapon give a weapon bonus to units around it Vger Generals & Zero Hour Editing 6 06-08-2004 04:19 AM
help changing effects of a weapon when another weapon fires Vger Generals & Zero Hour Editing 0 12-25-2003 11:50 PM


All times are GMT -4. The time now is 04:05 PM.


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