View Full Version : need help with coding powerup custom
SEBASTIEN-NOVA
12-09-2007, 09:52 AM
Hi guys,
I'm mapper since few years on Ued but I'm totally noob with codding.
So I need help with codding some powerups customs in a map nearly finished.
What I want :
-Change the mesh displaying under the powerup (seems to not be possible without codding:()
-Change the duration of the powerup.
-Change the sound when you pickup it.
-If it's possible, store the new powerup inside the map (I mean have custom powerup without a .u next the map file)
I hope you wil help me guys ;)
(I have already export all .uc files)
Zenoxious
12-09-2007, 07:49 PM
Well in order to go codding you need a fishing line and some tackle :D
SEBASTIEN-NOVA
12-10-2007, 12:21 PM
:confused:
Really, there is nobody who can help me?
I'm sure there is a guy here who is a beast on coding and can explain me how to make that easily ...
Aksen
12-10-2007, 12:30 PM
Sebastien,
Do you have a copy of the source? You can export from UED or download a zip here (http://www.click-where.com/ut3/UT3Scripts3464.zip).
Now poke around for UT powerup scripts.... Berserk and the Damage amplifier should be in there. Read them to get ideas.
SEBASTIEN-NOVA
12-10-2007, 01:03 PM
Sebastien,
Do you have a copy of the source? You can export from UED or download a zip here (http://www.click-where.com/ut3/UT3Scripts3464.zip).
Now poke around for UT powerup scripts.... Berserk and the Damage amplifier should be in there. Read them to get ideas.
First, thx for your reply ;)
So I have already export all scripts,
take a look to UTArmorVestpickup.uc for example (I presume berserk or invulnerability works the same way)
It looks like :
* Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
*/
class UTArmorPickup_Vest extends UTArmorPickupFactory;
/** CanUseShield()
returns how many shield units P could use
*/
function int CanUseShield(UTPawn P)
{
return Max(0,ShieldAmount - P.VestArmor);
}
/** AddShieldStrength()
add shield to appropriate P armor type.
*/
function AddShieldStrength(UTPawn P)
{
P.VestArmor = Max(ShieldAmount, P.VestArmor);
}
defaultproperties
{
ShieldAmount=50
Begin Object Class=UTParticleSystemComponent Name=ArmorParticles ObjName=ArmorParticles Archetype=UTParticleSystemComponent'UTGame.Default __UTArmorPickupFactory:ArmorParticles'
ObjectArchetype=UTParticleSystemComponent'UTGame.D efault__UTArmorPickupFactory:ArmorParticles'
End Object
ParticleEffects=ArmorParticles
PickupSound=SoundCue'A_Pickups.Armor.Cue.A_Pickups _Armor_Chest_Cue'
PickupMessage="Armor Vest"
Begin Object Class=DynamicLightEnvironmentComponent Name=PickupLightEnvironment ObjName=PickupLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame. Default__UTArmorPickupFactory:PickupLightEnvironme nt'
ObjectArchetype=DynamicLightEnvironmentComponent'U TGame.Default__UTArmorPickupFactory:PickupLightEnv ironment'
End Object
LightEnvironment=PickupLightEnvironment
MaxDesireability=1.000000
Begin Object Class=CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTArmo rPickupFactory:CollisionCylinder'
ObjectArchetype=CylinderComponent'UTGame.Default__ UTArmorPickupFactory:CollisionCylinder'
End Object
CylinderComponent=CollisionCylinder
Components(0)=CollisionCylinder
Begin Object Class=PathRenderingComponent Name=PathRenderer ObjName=PathRenderer Archetype=PathRenderingComponent'UTGame.Default__U TArmorPickupFactory:PathRenderer'
ObjectArchetype=PathRenderingComponent'UTGame.Defa ult__UTArmorPickupFactory:PathRenderer'
End Object
Components(1)=PathRenderer
Components(2)=PickupLightEnvironment
Begin Object Class=StaticMeshComponent Name=BaseMeshComp ObjName=BaseMeshComp Archetype=StaticMeshComponent'UTGame.Default__UTAr morPickupFactory:BaseMeshComp'
ObjectArchetype=StaticMeshComponent'UTGame.Default __UTArmorPickupFactory:BaseMeshComp'
End Object
Components(3)=BaseMeshComp
Components(4)=ArmorParticles
Begin Object Class=StaticMeshComponent Name=ArmorPickUpComp ObjName=ArmorPickUpComp Archetype=StaticMeshComponent'UTGame.Default__UTAr morPickupFactory:ArmorPickUpComp'
StaticMesh=StaticMesh'PICKUPS.Armor.Mesh.S_Pickups _Armor'
Translation=(X=0.000000,Y=0.000000,Z=-50.000000)
ObjectArchetype=StaticMeshComponent'UTGame.Default __UTArmorPickupFactory:ArmorPickUpComp'
End Object
Components(5)=ArmorPickUpComp
CollisionComponent=CollisionCylinder
Name="Default__UTArmorPickup_Vest"
ObjectArchetype=UTArmorPickupFactory'UTGame.Defaul t__UTArmorPickupFactory'
}
So I create new file named NOVAUTArmorPickupVest.uc and the script looks like :
class NOVAUTArmorPickupVest extends UTArmorPickup_Vest;
defaultproperties
{
ShieldAmount=100
PickupSound=SoundCue'NovaSound.PickupsArmorVest_Cu e'
PickupMessage="You got the Special Armor Vest"
StaticMesh=StaticMesh'NovaMesh.PickupArmorVest'
}
-First question :
After I need to compile the script and I obtain a new .u file, is it correct?
-Second question :
Is there a way to store the .u file inside the map file ? (I don't want to have to share the.u next my map)
Thx in advance ;)
Aksen
12-10-2007, 01:11 PM
sorry friend, that's outside what i've learned so far. new to coding myself ;)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.