Alright, I'm making a gun torret for Attack on Theed and i've ran into a little problem. What my cog does is teleports the player to a platform, and sets his actor flags such that he can't move, only turn and fire. I use SelectWeapon to make him pull out the strifle, and i set his super charge bin so he can fire fast. I also try to change his energy ammo inventory to 999.
You experience cog guys probably see my problem already. ChangeInv doesn't let you exceed the bin max, and apparently neither does SetInv. Is there a way I can change an inventory to a value higher than the bin max? And if not, can you guys think of a way around this? Its every important that this be done without modifying items.dat so that AoT can be played with mods. Here are the cogs for you to look at.
And the cient side of the cog:
------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
[This message has been edited by SM_Sith_Lord (edited January 01, 2004).]
You experience cog guys probably see my problem already. ChangeInv doesn't let you exceed the bin max, and apparently neither does SetInv. Is there a way I can change an inventory to a value higher than the bin max? And if not, can you guys think of a way around this? Its every important that this be done without modifying items.dat so that AoT can be played with mods. Here are the cogs for you to look at.
Code:
# Jedi Knight Cog Script # # aot_defensegun.cog # # Controls the defense guns. # # [SM SIth Lord] # # This cog is not made or distributed by LucasArts Entertainment Co. symbols message activated message timer surface actiswitch=-1 thing player local thing gunport=-1 thing exitport=-1 thing debugcam=-1 end # ======================================================================================== code activated: player = GetSourceRef(); SetActorFlags(player,0x840000); TeleportThing(player,gunport); SendTrigger(player,771,player,exitport,-1,-1); SetTimerEx(30,1,player,-1); return; timer: SetCameraFocus(1,debugcam); return; # ........................................................................................ end
And the cient side of the cog:
Code:
# Jedi Knight Cog Script # # aot_defensegun_cli.cog # # Client side of defense gun. # # [SM SIth Lord] # # This cog is not made or distributed by LucasArts Entertainment Co. flags=0x240 symbols message trigger message pulse thing exitport local thing player local flex oldammo=-1 local end # ======================================================================================== code trigger: player = GetLocalPlayerThing(); if( GetSourceRef() != 771 || GetParam(0) != player ) return; exitport = GetParam(1); SelectWeapon(player,3); oldammo = GetInv(player,11); SetInv(player,11,999); SetPulse(0.5); return; pulse: if( GetCurWeapon(player) == 3 && GetInv(player,11) > 500 ){ if( GetInv(player,63) != 3.0 ) ChangeInv(player,63,3.0); if( GetInv(player,11) != 999 ) SetInv(player,11,999); } else{ SetPulse(0); ChangeInv(player,11,oldammo); oldammo = -1; TeleportThing(player,exitport); ClearActorFlags(player,0x840000); } return; # ........................................................................................ end
------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
[This message has been edited by SM_Sith_Lord (edited January 01, 2004).]