Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » just wondering : weaponbagclass
just wondering : weaponbagclass [message #464285] Mon, 12 March 2012 05:47 Go to next message
robbyke is currently offline  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 #464288 is a reply to message #464285] Mon, 12 March 2012 06:15 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Is this a function in 4.0, or ssgm? I only ask because I'm not seeing it in Stock 3.4.4 scripts source.

Re: just wondering : weaponbagclass [message #464289 is a reply to message #464285] Mon, 12 March 2012 06:23 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
its in 4.0 scripts

Owner of kambot TT server

kambot.freeforums.org
Re: just wondering : weaponbagclass [message #464291 is a reply to message #464289] Mon, 12 March 2012 06:27 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Well if you haven't been helped in 10 hours I'll have a look at it after I get off work.

Re: just wondering : weaponbagclass [message #464292 is a reply to message #464285] Mon, 12 March 2012 06:46 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3555
Registered: February 2003
Karma: 0
General (3 Stars)

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 Go to previous messageGo to next message
robbyke is currently offline  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 #464305 is a reply to message #464293] Mon, 12 March 2012 10:57 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
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.

Re: just wondering : weaponbagclass [message #464307 is a reply to message #464305] Mon, 12 March 2012 11:27 Go to previous messageGo to next message
robbyke is currently offline  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
index.php?t=getfile&id=14036&private=0


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 #464330 is a reply to message #464307] Mon, 12 March 2012 18:15 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

robbyke wrote on Mon, 12 March 2012 13:27


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

Maybe this is me being logical but if you found such a thing (that is obviously a bug), maybe you should report it to the TT team instead of trying to make some odd workaround for it? Just a thought.


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: just wondering : weaponbagclass [message #464336 is a reply to message #464285] Mon, 12 March 2012 23:49 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
lets see it was about a year ago when i asked if it was a bug


old post


i guess this topic will end now just like last time


Owner of kambot TT server

kambot.freeforums.org

[Updated on: Tue, 13 March 2012 04:41]

Report message to a moderator

Re: just wondering : weaponbagclass [message #464345 is a reply to message #464336] Tue, 13 March 2012 05:59 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Are you still using the sam site quick turn object?

If you are, check and make sure it CAN aim down (Has a min tilt of at MOST 0 if not less).


Re: just wondering : weaponbagclass [message #464359 is a reply to message #464285] Tue, 13 March 2012 09:40 Go to previous messageGo to next message
robbyke is currently offline  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 #464373 is a reply to message #464359] Tue, 13 March 2012 13:47 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
If a vehicle had a sight of of 360 it'd be able to see all around it. If it had a sight arc of 90 it'd be able to see 45degrees to each side of its turret.

What script do the sams have on them?


Re: just wondering : weaponbagclass [message #464376 is a reply to message #464285] Tue, 13 March 2012 14:48 Go to previous messageGo to next message
robbyke is currently offline  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 Go to previous messageGo to next message
Gen_Blacky is currently offline  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.


http://s18.postimage.org/jc6qbn4k9/bricks3.png

[Updated on: Tue, 13 March 2012 17:29]

Report message to a moderator

Re: just wondering : weaponbagclass [message #464386 is a reply to message #464285] Tue, 13 March 2012 17:50 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
i want the sam site to attack all possible enemies so also ground units

Owner of kambot TT server

kambot.freeforums.org
Re: just wondering : weaponbagclass [message #464404 is a reply to message #464386] Wed, 14 March 2012 05:42 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
robbyke wrote on Tue, 13 March 2012 18:50

i want the sam site to attack all possible enemies so also ground units

Test M07_SAM_Site_Logic and see if it hits air units or if the aim problem presists, if it does then we have a even more odd issue then just the choice of scripts being used at hand.


Re: just wondering : weaponbagclass [message #464405 is a reply to message #464285] Wed, 14 March 2012 06:08 Go to previous messageGo to next message
robbyke is currently offline  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 #464410 is a reply to message #464405] Wed, 14 March 2012 09:23 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Attach the scripts to a tank and see if it can fire at the right angles.

Re: just wondering : weaponbagclass [message #464411 is a reply to message #464285] Wed, 14 March 2012 09:54 Go to previous messageGo to next message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma: 0
Recruit
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


Owner of kambot TT server

kambot.freeforums.org

[Updated on: Wed, 14 March 2012 09:55]

Report message to a moderator

Re: just wondering : weaponbagclass [message #464417 is a reply to message #464285] Wed, 14 March 2012 13:39 Go to previous messageGo to next message
triattack is currently offline  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 #464418 is a reply to message #464411] Wed, 14 March 2012 14:07 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
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.


Re: just wondering : weaponbagclass [message #464419 is a reply to message #464417] Wed, 14 March 2012 14:32 Go to previous messageGo to next message
robbyke is currently offline  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


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 Go to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3805
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.

Previous Topic: LevelEdit Scripts after beta 4 update
Next Topic: Issue with converting a facing to a Vector3.Z value to look at
Goto Forum:
  


Current Time: Wed May 29 00:43:02 MST 2024

Total time taken to generate the page: 0.01401 seconds