| just wondering : weaponbagclass [message #464285] | 
			Mon, 12 March 2012 05:47   | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		it has some functions to give weapons with weapons names instead of powerups 
 
WeaponClass * 	Add_Weapon( const WeaponDefinitionClass * def, int rounds = 0, bool give_weapon = true ); 
	WeaponClass * 	Add_Weapon( int id, int rounds = 0, bool give_weapon = true ); 
	WeaponClass * 	Add_Weapon( const char *weapon_name, int rounds = 0, bool give_weapon = true ); 
 
now im just a coding newby but is it possible to use it because what i have tried gives a linking error 
 
void KB_Give_Weapon(GameObject *obj,const char *Weapon)
{
	WeaponBagClass *Gun= ((ArmedGameObj *)obj)->Get_Weapon_Bag();
	Gun->Add_Weapon(Weapon,0,true);
}
 
 
 
Error	2	error LNK2001: unresolved external symbol "public: class WeaponClass * __thiscall WeaponBagClass::Add_Weapon(char const *,int,bool)" (?Add_Weapon@WeaponBagClass@@QAEPAVWeaponClass@@PBDH_N@Z)	C:\Users\robby\Desktop\source test\Kambot\KB_Functions.obj	Kambot 
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 | 
	| 
		
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464292 is a reply to message #464285] | 
			Mon, 12 March 2012 06:46    | 
		 
		
			| 
				
	 | 
 
	
		You cant call WeaponBagClass::Add_Weapon because its in tt.dll and not exposed to scripts.dll 
Plus, it wouldn't work the way you think it works anyway, there is extra logic in the powerup code that does special stuff when granting a weapon. 
		
		
  Jonathan Wilson aka Jonwil 
Creator and Lead Coder of the Custom scripts.dll 
Renegade Engine Guru 
Creator and Lead Coder of TT.DLL 
Official member of Tiberian Technologies 
		
 |  
	| 
		
	 | 
 
 
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464293 is a reply to message #464285] | 
			Mon, 12 March 2012 07:01    | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		is there no way to add weapons manually somehow, maybe to change some defense weapons? 
 
because samsites wont change their aiming angle anymore 
 
also how far can object.gm mods go  
if change an object his weapon and only server use it does it work? or wont the weapon fire then 
 
 
 
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		[Updated on: Mon, 12 March 2012 07:19] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464307 is a reply to message #464305] | 
			Mon, 12 March 2012 11:27    | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		| Jerad Gray wrote on Mon, 12 March 2012 18:57 |   What do you mean add manually? If you're just asking if you can grant a weapon to a player you do it by power up.
  |  
  
 
i used in scripts 3.4.4 a samsite for defense,if the defense script was attached it shot scattering missiles at average range. 
 
on TT however the sam site models only aim in a specific angle 
 
so i wanted to give for example the agt missile or obi laser, the samsite weapon so it can fire in all directions again 
 
it fires but not has no real aim 
 
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		[Updated on: Mon, 12 March 2012 11:55] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 | 
	| 
		
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464359 is a reply to message #464285] | 
			Tue, 13 March 2012 09:40    | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		min tilt -45 and max 45 
 
it used to work on 3.4.4 i dont think they modified all the objects i used multiple sam sites. 
 
only the object NOD SamSite aimed and fired in some direction but it aimed to high and only at  vtols 
 
what does 'sight arc' do? 
 
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		[Updated on: Tue, 13 March 2012 10:08] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464376 is a reply to message #464285] | 
			Tue, 13 March 2012 14:48    | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		none basic or not that i know off 
 
i just attach JFW_Base_Defence 
 
 
 
it used to be "M10_Turret_Tank" 
 
after some more testing i noticed that it aims but above me 
so it will allways miss 
 
im goin to test if its the M10_Turret_Tank script
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		[Updated on: Tue, 13 March 2012 16:36] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464385 is a reply to message #464285] | 
			Tue, 13 March 2012 17:27    | 
		 
		
			
				
				
				  | 
					
						  
						Gen_Blacky
						 Messages: 3250 Registered: September 2006 
						
	Karma: 1
 
					 | 
					General (3 Stars)  | 
					 | 
		 
		 
	 | 
 
	
		don't use base_defense on a sam site ... unless you want it to attack ground. 
 
| Quote: |   M07_SAM_Site_Logic - Author: Westwood Studios 
 
Details 
The Turret act like a base defense, but only attac AirUnits. 
 
Parameters 
-= none =- 
 
Comments 
Prefer this script instead of the other SAM-Site scripts, because these are maybe only for SP, some create an object after destruction, etc. 
 
Known Issues 
To improve the aiming of the SAM/Air turret, you have to edit the turret itself, there are no parameters for this script.
  |   
		
		
 
   
		[Updated on: Tue, 13 March 2012 17:29] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464405 is a reply to message #464285] | 
			Wed, 14 March 2012 06:08    | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		results: 
 
JFW_Base_Defence : no longer has any response wont fire wont react 
 
M10_Turret_Tank : fires wrong mainly above the target 
also reacts to ground targets 
 
M07_SAM_Site_Logic : same as M10_Turret_Tank only doesnt respond to ground targets 
 
 
used object SAM_Site_Quick_Turn 
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464417 is a reply to message #464285] | 
			Wed, 14 March 2012 13:39    | 
		 
		
			
				
				
				
					
						  
						triattack
						 Messages: 14 Registered: May 2011 
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		looked at the readme here are some base defence scripts (with info) 
cript Name: "RA_Base_Defense_Simple" 
 
 
Description: 
 
A simplified version of a prototype script for a threat assessing Base Defense. It is capable of basic target prioritizing and can adjust its aim when firing at infantry. The script can be set to prioritize infantry, vehicles, or both equally. It will also rate targets based on remaining health, range, and if the target is a player or AI. Players are considered a higher priority than AI. The lower a target's health, the more likely it will be prioritized. The closer a unit is, the higher its priority is.      
 
Script Parameters: 
 
-MinRange: The minimum range to attack a target. Targets closer than this will be ignored. Default is 0.0. 
 
-MaxRange: The maximum range to attack a target. Targets further than this will be ignored. Default is 100.0. 
 
-AntiAir: Sets if the script targets aircraft. 1 = Yes, 0 = No. Default is 0. 
 
-AntiGround: Sets if the script targets ground units. 1 = Yes, 0 = No. Default is 1. 
 
-AdjustAim: Sets if the script will adjust its aim for infantry. 1 = Yes, 0 = No. Default is 0. 
 
-TargetMode: Sets the script's target priority. 0 = Vehicles before Infantry, 1 = Infantry before Vehicles. Anything else will cause script to ignore infantry/vehicle distinctions and rely solely on range/health/player for prioritizing. Default is 0. 
 
Notes: 
 
Adjusting aim for infantry is useful for base defenses that fire "slow" projectiles, like a cannon. Infantry can typically sidestep these kinds of attacks. The adjusted aim targets the ground the soldier is standing on instead of the soldier. This causes the projectile to explode right next to a soldier instead of traveling another 20 or so meters before impacting the ground. For base defenses that fire "fast" projectiles or non-explosive projectiles, like a machine gun, do not adjust aim for soldiers, as the adjustment would likely cause the projectile to miss completely. 
 
 ******************************************************************************** ************** 
 
Script Name: "RA_Base_Defense_Powered" 
 
 
Description: 
 
A simplified version of a prototype script for a threat assessing Base Defense. It is capable of basic target prioritizing and can adjust its aim when firing at infantry. The script can be set to prioritize infantry, vehicles, or both equally. It will also rate targets based on remaining health, range, and if the target is a player or AI. Players are considered a higher priority than AI. The lower a target's health, the more likely it will be prioritized. The closer a unit is, the higher its priority is. 
This one stops attacking if the power goes low. 
 
Script Parameters: 
 
-MinRange: The minimum range to attack a target. Targets closer than this will be ignored. Default is 0.0. 
 
-MaxRange: The maximum range to attack a target. Targets further than this will be ignored. Default is 100.0. 
 
-AntiAir: Sets if the script targets aircraft. 1 = Yes, 0 = No. Default is 0. 
 
-AntiGround: Sets if the script targets ground units. 1 = Yes, 0 = No. Default is 1. 
 
-AdjustAim: Sets if the script will adjust its aim for infantry. 1 = Yes, 0 = No. Default is 0. 
 
-TargetMode: Sets the script's target priority. 0 = Vehicles before Infantry, 1 = Infantry before Vehicles. Anything else will cause script to ignore infantry/vehicle distinctions and rely solely on range/health/player for prioritizing. Default is 0. 
 
Notes: 
 
Adjusting aim for infantry is useful for base defenses that fire "slow" projectiles, like a cannon. Infantry can typically sidestep these kinds of attacks. The adjusted aim targets the ground the soldier is standing on instead of the soldier. This causes the projectile to explode right next to a soldier instead of traveling another 20 or so meters before impacting the ground. For base defenses that fire "fast" projectiles or non-explosive projectiles, like a machine gun, do not adjust aim for soldiers, as the adjustment would likely cause the projectile to miss completely. 
 
		
		
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464419 is a reply to message #464417] | 
			Wed, 14 March 2012 14:32    | 
		 
		
			
				
				
				
					
						  
						robbyke
						 Messages: 348 Registered: September 2010  Location: Belgium
						
	Karma: 0
 
					 | 
					Recruit  | 
					 | 
		 
		 
	 | 
 
	
		| triattack wrote on Wed, 14 March 2012 21:39 |   looked at the readme here are some base defence scripts (with info) 
cript Name: "RA_Base_Defense_Simple" 
 
 
Description: 
 
A simplified version of a prototype script for a threat assessing Base Defense. It is capable of basic target prioritizing and can adjust its aim when firing at infantry. The script can be set to prioritize infantry, vehicles, or both equally. It will also rate targets based on remaining health, range, and if the target is a player or AI. Players are considered a higher priority than AI. The lower a target's health, the more likely it will be prioritized. The closer a unit is, the higher its priority is.      
 
Script Parameters: 
 
-MinRange: The minimum range to attack a target. Targets closer than this will be ignored. Default is 0.0. 
 
-MaxRange: The maximum range to attack a target. Targets further than this will be ignored. Default is 100.0. 
 
-AntiAir: Sets if the script targets aircraft. 1 = Yes, 0 = No. Default is 0. 
 
-AntiGround: Sets if the script targets ground units. 1 = Yes, 0 = No. Default is 1. 
 
-AdjustAim: Sets if the script will adjust its aim for infantry. 1 = Yes, 0 = No. Default is 0. 
 
-TargetMode: Sets the script's target priority. 0 = Vehicles before Infantry, 1 = Infantry before Vehicles. Anything else will cause script to ignore infantry/vehicle distinctions and rely solely on range/health/player for prioritizing. Default is 0. 
 
Notes: 
 
Adjusting aim for infantry is useful for base defenses that fire "slow" projectiles, like a cannon. Infantry can typically sidestep these kinds of attacks. The adjusted aim targets the ground the soldier is standing on instead of the soldier. This causes the projectile to explode right next to a soldier instead of traveling another 20 or so meters before impacting the ground. For base defenses that fire "fast" projectiles or non-explosive projectiles, like a machine gun, do not adjust aim for soldiers, as the adjustment would likely cause the projectile to miss completely. 
 
     ******************************************************************************** ************** 
 
Script Name: "RA_Base_Defense_Powered" 
 
 
Description: 
 
A simplified version of a prototype script for a threat assessing Base Defense. It is capable of basic target prioritizing and can adjust its aim when firing at infantry. The script can be set to prioritize infantry, vehicles, or both equally. It will also rate targets based on remaining health, range, and if the target is a player or AI. Players are considered a higher priority than AI. The lower a target's health, the more likely it will be prioritized. The closer a unit is, the higher its priority is. 
This one stops attacking if the power goes low. 
 
Script Parameters: 
 
-MinRange: The minimum range to attack a target. Targets closer than this will be ignored. Default is 0.0. 
 
-MaxRange: The maximum range to attack a target. Targets further than this will be ignored. Default is 100.0. 
 
-AntiAir: Sets if the script targets aircraft. 1 = Yes, 0 = No. Default is 0. 
 
-AntiGround: Sets if the script targets ground units. 1 = Yes, 0 = No. Default is 1. 
 
-AdjustAim: Sets if the script will adjust its aim for infantry. 1 = Yes, 0 = No. Default is 0. 
 
-TargetMode: Sets the script's target priority. 0 = Vehicles before Infantry, 1 = Infantry before Vehicles. Anything else will cause script to ignore infantry/vehicle distinctions and rely solely on range/health/player for prioritizing. Default is 0. 
 
Notes: 
 
Adjusting aim for infantry is useful for base defenses that fire "slow" projectiles, like a cannon. Infantry can typically sidestep these kinds of attacks. The adjusted aim targets the ground the soldier is standing on instead of the soldier. This causes the projectile to explode right next to a soldier instead of traveling another 20 or so meters before impacting the ground. For base defenses that fire "fast" projectiles or non-explosive projectiles, like a machine gun, do not adjust aim for soldiers, as the adjustment would likely cause the projectile to miss completely. 
 
  |  
  
 
tried it same effect 
 
| Jerad Gray wrote on Wed, 14 March 2012 22:07 |  
 | robbyke wrote on Wed, 14 March 2012 10:54 |   i attached  
 
the m10 
 
and the m07 
 
the m07 script aimed verry well if i hung still it would hit 
 
the m10 script had bad aim but it aimed at me 
 
i think the m10 script was never meant to hit directly
  |  
  
Sounds like an issue with the samsites 3d model, perhaps the muzzle bone is angled wrong in the 3d mode; or maybe the muzzle effect fix 4.0 made for the mammoth tank barrels broke it some how.
  |  
  
 
perhaps but then its a bug and they should fix it no? 
 
i found this in _asset_error.txt 
 
Toggle Spoiler 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'p_ExSphere1' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
Failed to load 'MZ_B_SAMSITE' 
 
   
 
maybe this has something to do with it? 
 
i worked around it with a objects.gm mod 
		
		
  Owner of kambot TT server 
 
kambot.freeforums.org
		[Updated on: Thu, 15 March 2012 10:35] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 | 
	
		
		
			| Re: just wondering : weaponbagclass [message #464481 is a reply to message #464419] | 
			Fri, 16 March 2012 07:01   | 
		 
		
			
				
				
				  | 
					
						  
						Jerad2142
						 Messages: 3826 Registered: July 2006  Location: USA
						
	Karma: 6
 
					 | 
					General (3 Stars)  | 
					 | 
		 
		 
	 | 
 
	
		Looks more like its just missing a muzzle flash/fire effect, probably used to have some really neat looking primitive effects and smoke that ea took out when they replaced some of the Westwood employees or whatever. It shouldn't be the issue; however, I still recommend you bring it up in the TT Thread.
		
		
 
  
Visit Jerad's deer sweat shop
		
 |  
	| 
		
	 | 
 
 
 |