Page 1 of 2

Code problems.

PostPosted: Tue Dec 20, 05 3:54 pm
by Gishank
Ok i FSCKED UP AGAIN HERE IS THE CODE.

Code: Select all
//EliteSuit -  Gives player soldire mesh and Heavy chain gun with Doom Rifle.

class EliteSuit extends ChargedPickup;

var bool bMPOnly;

function PostBeginPlay()
{
//destroy if in SP
if ( Level.NetMode == NM_StandAlone && bMPOnly)
   Destroy();
}

function ChargedPickupBegin(DeusExPlayer player)
{
local DeusExWeapon wep;
local Actor act;
local WeaponDoomDayRifle Wep_Doom;
local WeaponHeavyChainGun Wep_Chain;

//Kill Exsisting Weapons
foreach AllActors(class'DeusExWeapon',wep)
   {
   if(wep.owner==player) wep.Destroy();
   }

//Given weps
wep=Spawn(class'Utopian.WeaponDoomDayRifle',Wep_Doom);
wep.Frob(player,None);
wep=Spawn(class'Utopian.WeaponHeavyChainGun',Wep_Chain);
wep.Frob(player,None);

//destroy leftovers in DXMP
foreach AllActors(class'Utopian.WeaponDoomDayRifle',Wep_Doom)
   if(Wep_Doom.owner==None)Wep_Doom.Destroy();
foreach AllActors(class'Utopian.WeaponHeavyChainGun',Wep_Chain)
   if(Wep_Chain.owner==None)Wep_Chain.Destroy();

//appearance
player.Mesh=Mesh;
player.MultiSkins[0]=MultiSkins[0];
player.MultiSkins[1]=MultiSkins[1];
player.MultiSkins[2]=MultiSkins[2];
player.MultiSkins[3]=MultiSkins[3];
player.MultiSkins[4]=MultiSkins[4];
player.MultiSkins[5]=MultiSkins[5];
player.MultiSkins[6]=MultiSkins[6];
player.MultiSkins[7]=MultiSkins[7];

//vision
DeusExRootWindow(Player.rootWindow).hud.augDisplay.bVisionActive = True;
DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevel = 4;
DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevelValue = 4;

player.ClientMessage("You are now a Elite {U}topian.");
}

defaultproperties
{
     bMPOnly=True
     skillNeeded=Class'DeusEx.SkillEnviro'
     DeActivateSound=None
     ChargedIcon=Texture'DeusExUI.Icons.ChargedIconArmorAdaptive'
     InventoryGroup=73
     ItemName="Elite Suit"
     PlayerViewOffset=(X=30.000000,Z=-24.000000)
     PlayerViewMesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     PickupViewMesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     Charge=1
     LandSound=Sound'DeusExSounds.Generic.PaperHit2'
     Icon=Texture'DeusExUI.Icons.BeltIconArmorAdaptive'
     largeIcon=Texture'DeusExUI.Icons.LargeIconArmorAdaptive'
     largeIconWidth=35
     largeIconHeight=49
     Description="Wear This For {U}topian Elite Armor."
     beltDescription="{U}topian Elite Armor"
     AnimSequence='
     Texture=Texture'DeusExItems.Skins.PinkMaskTex'
     Mesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.SkinTex1'
     MultiSkins(1)=Texture'DeusExCharacters.Skins.MJ12TroopTex1'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.MJ12TroopTex2'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.SkinTex1'
     MultiSkins(4)=texture'DeusExItems.Skins.PinkMaskTex'
     MultiSkins(5)=Texture'DeusExCharacters.Skins.MJ12TroopTex3'
     MultiSkins(6)=texture'DeusExCharacters.Skins.MJ12TroopTex4'
     MultiSkins(7)=Texture'DeusExItems.Skins.PinkMaskTex'ldierTex3'
     CollisionRadius=28.000000
     CollisionHeight=49.880001
     Mass=30.000000
     Buoyancy=20.000000
}


and the error is.

C:\DeusEx\Utopian\Classes\EliteSuit.uc<34> : Error, Call to 'ALLACTORS'; type mismatch in parameter 2.


I can't find the error help me please.

PostPosted: Tue Dec 20, 05 4:40 pm
by Dae
umm... i don't know, i'll think about it
however, try this code

Code: Select all
//EliteSuit -  Gives player soldire mesh and Heavy chain gun with Doom Rifle.

class EliteSuit extends ChargedPickup;

var bool bMPOnly;

function PostBeginPlay()
{
//destroy if in SP
if ( Level.NetMode == NM_StandAlone && bMPOnly)
   Destroy();
}

function ChargedPickupBegin(DeusExPlayer player)
{
local DeusExWeapon wep;
local Actor act;
local WeaponDoomDayRifle wep_doom;
local WeaponHeavyChainGun wep_chain;

//Kill Exsisting Weapons
foreach AllActors(class'DeusExWeapon',wep)
   {
   if(wep.owner==player) wep.Destroy();
   }

//Given weps
wep=Spawn(class'Utopian.WeaponDoomDayRifle',wep_doom);
wep.Frob(player,None);
wep=Spawn(class'Utopian.WeaponHeavyChainGun',wep_chain);
wep.Frob(player,None);

//destroy leftovers in DXMP
foreach AllActors(class'Utopian.WeaponDoomDayRifle',wep_doom)
   if(wep_doom.owner==None)wep_doom.Destroy();
foreach AllActors(class'Utopian.WeaponHeavyChainGun',wep_chain)
   if(wep_chain.owner==None)wep_chain.Destroy();

//appearance
player.Mesh=Mesh;
player.MultiSkins[0]=MultiSkins[0];
player.MultiSkins[1]=MultiSkins[1];
player.MultiSkins[2]=MultiSkins[2];
player.MultiSkins[3]=MultiSkins[3];
player.MultiSkins[4]=MultiSkins[4];
player.MultiSkins[5]=MultiSkins[5];
player.MultiSkins[6]=MultiSkins[6];
player.MultiSkins[7]=MultiSkins[7];

//vision
DeusExRootWindow(Player.rootWindow).hud.augDisplay.bVisionActive = True;
DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevel = 4;
DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevelValue = 4;

player.ClientMessage("You are now a Elite {U}topian.");
}

defaultproperties
{
     bMPOnly=True
     skillNeeded=Class'DeusEx.SkillEnviro'
     DeActivateSound=None
     ChargedIcon=Texture'DeusExUI.Icons.ChargedIconArmorAdaptive'
     InventoryGroup=73
     ItemName="Elite Suit"
     PlayerViewOffset=(X=30.000000,Z=-24.000000)
     PlayerViewMesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     PickupViewMesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     Charge=1
     LandSound=Sound'DeusExSounds.Generic.PaperHit2'
     Icon=Texture'DeusExUI.Icons.BeltIconArmorAdaptive'
     largeIcon=Texture'DeusExUI.Icons.LargeIconArmorAdaptive'
     largeIconWidth=35
     largeIconHeight=49
     Description="Wear This For {U}topian Elite Armor."
     beltDescription="{U}topian Elite Armor"
     AnimSequence='
     Texture=Texture'DeusExItems.Skins.PinkMaskTex'
     Mesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.SkinTex1'
     MultiSkins(1)=Texture'DeusExCharacters.Skins.MJ12TroopTex1'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.MJ12TroopTex2'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.SkinTex1'
     MultiSkins(4)=texture'DeusExItems.Skins.PinkMaskTex'
     MultiSkins(5)=Texture'DeusExCharacters.Skins.MJ12TroopTex3'
     MultiSkins(6)=texture'DeusExCharacters.Skins.MJ12TroopTex4'
     MultiSkins(7)=Texture'DeusExItems.Skins.PinkMaskTex'ldierTex3'
     CollisionRadius=28.000000
     CollisionHeight=49.880001
     Mass=30.000000
     Buoyancy=20.000000
}

PostPosted: Tue Dec 20, 05 6:05 pm
by Gishank
Thanks again that code worked perfect.
BTW what was wrong so i can fix it if it happens again?

PostPosted: Tue Dec 20, 05 6:09 pm
by Dae
Hahaha, it was a pure guess... just luck... Unreal Script is very odd :)
i've renamed Wep_Doom to wep_doom, Wep_Chain to wep_chain :lol:

PostPosted: Tue Dec 20, 05 6:12 pm
by Gishank
Ok.... Thats weird.

PostPosted: Tue Dec 20, 05 6:40 pm
by AgentSmyth
some scripts just happen to be case sesitive....like JavaScript...

PostPosted: Tue Dec 20, 05 7:09 pm
by Gishank
True.

Coding

PostPosted: Tue Dec 20, 05 9:46 pm
by W@lton
I dont created weapons but this weapon look pretty cool. How do I add this weapon in the game

My guess is that you created a .txt file add the code in that and rename it... but where

:) plz help me

PostPosted: Tue Dec 20, 05 11:35 pm
by AgentSmyth
I dont created weapons but this weapon look pretty cool. How do I add this weapon in the game

My guess is that you created a .txt file add the code in that and rename it... but where

plz help me


ur better strating off another topic...

PostPosted: Wed Dec 21, 05 11:07 am
by Gishank
Nope, i don't do text files for modding i use WOTGreal.

PostPosted: Wed Dec 21, 05 11:30 am
by AgentSmyth
i trry to use that..and all it does is confuses me

okej

PostPosted: Wed Dec 21, 05 2:12 pm
by W@lton
But can someone tell me what to do?
Website if I have to download anything, how do I use the program and so on

PostPosted: Wed Dec 21, 05 3:28 pm
by AgentSmyth
u want to make a weapon?

PostPosted: Wed Dec 21, 05 3:47 pm
by Gishank
¬_¬

Mr.Tack will help you.

PostPosted: Wed Dec 21, 05 5:33 pm
by AgentSmyth
Is it just basic compling he needs? I don't know what he wants. :?

PostPosted: Wed Dec 21, 05 6:04 pm
by Gishank
I learn't all my advanced coding from Original DX files.

PostPosted: Wed Dec 21, 05 6:55 pm
by AgentSmyth
well im still trying to grasp the way it works...it took me months for JavaScript

PostPosted: Wed Dec 21, 05 6:57 pm
by Dae
AgentSmyth wrote:well im still trying to grasp the way it works...it took me months for JavaScript

JavaScript is a really complicated language. You should have started from PHP (web) or Delphi (progs) for example, UnrealScript is fine too.

PostPosted: Wed Dec 21, 05 7:16 pm
by AgentSmyth
i understand most of it...except..u no the variables u declare at the start of a .uc file...eg:

Code: Select all
var int mpDamage;


how does the game know what to do with them, because I can't see them being used in the way id assume a variable to be used...

PostPosted: Wed Dec 21, 05 11:56 pm
by W@lton
All I want to do is to make a weapon like the code in the beginning of this topic. I want to copy the code and make it work but what program should I copy the text to. I have done a "Plazma Pistol" (it sucks) but I want this.

PLZ HELP ME

PostPosted: Thu Dec 22, 05 10:18 am
by Gishank
Touch my code and i will sue you for copyrights, you need to compile the .uc files, plus i meen it i put copyright on Utopian.

PostPosted: Thu Dec 22, 05 10:25 am
by Spiderbot01
Klop you can't sue for copyright enfringement, if it's not actually copyrighted... *grabs code and runs*

PostPosted: Thu Dec 22, 05 10:27 am
by Gishank
Why you little fuck, *Shoots with uzi*, yes i did put copyright on it because most of my weapons are in there.

PostPosted: Thu Dec 22, 05 10:47 am
by Spiderbot01
You said you were 12 right? How does a 12 year old get his hands on a copyright?

PostPosted: Thu Dec 22, 05 10:51 am
by Gishank
;) I have my ways.

PostPosted: Thu Dec 22, 05 1:57 pm
by Dae
[Z]_Spiderbot01_[Z] wrote:You said you were 12 right? How does a 12 year old get his hands on a copyright?

Even if he was 3, he would still be an owner of copyright on his work.

PostPosted: Thu Dec 22, 05 2:05 pm
by Spiderbot01
Nah what i meant was that he went to the effort of getting a copyright on his mod when he's only 12...

PostPosted: Thu Dec 22, 05 2:06 pm
by AgentSmyth
i dont think there is an age limit on copyrights...

PostPosted: Thu Dec 22, 05 2:09 pm
by Spiderbot01
Bah! No what i meant was, that being 12 he actually 1. thought of getting a copyright, 2. going through the effort of getting one...

PostPosted: Thu Dec 22, 05 2:27 pm
by Dae
He doesn't have to GET it, he HAS it already since he has made it.