1 / 13

class CBP1_Girl_A extends CBP1_Pawn; var string name; var bool Hit1; var bool Hit2;

class CBP1_Girl_A extends CBP1_Pawn; var string name; var bool Hit1; var bool Hit2; function Touch( actor Other ){ // Get the name of the Other actor touched and display the name name = Other.GetPropertyText("Name"); ClientMessage("CBP1_Girl_A::Touch: Touched Actor " $ name);

Download Presentation

class CBP1_Girl_A extends CBP1_Pawn; var string name; var bool Hit1; var bool Hit2;

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. class CBP1_Girl_A extends CBP1_Pawn; var string name; var bool Hit1; var bool Hit2; function Touch( actor Other ){ // Get the name of the Other actor touched and display the name name = Other.GetPropertyText("Name"); ClientMessage("CBP1_Girl_A::Touch: Touched Actor " $ name); // Test to see if we've touched UseTrigger0 if(name == "UseTrigger0") { Hit1 = true; } // Test to see if we've touched Spotlight0 if(name == "Spotlight0") { Hit2 = true; } if ( (Hit1 == true) && (Hit2==true) ) ClientMessage("GOAL ACHIEVED"); } function BeginPlay() { // Initialize variables Hit1 and Hit2 to false - they're NOT yet hit Hit1 = false; Scripting = Programming

  2. The Concept of Classes Object • Object has tons of code • Actor “inherits” this via “extend” • Pawn “inherits” this likewise • So does CBP1_Girl • and also CBP1_Girl_A Actor Pawn UseTrigger x • But CBP1_Girl can replace Pawn’s code CBP1_Girl CBP1_Girl_A

  3. The runtime engine function BeginPlay() { } Your stuff here Runtime Engine function Touch() { } Your stuff here function Bump() { } Your stuff here Invisible Visible for each Actor

  4. Touch function Touch() { }

  5. This and Other Actors Level File : CBP1_Girl.uc class CBP1_Girl extends CBP1_Pawn; function Touch( actor Other ){ } UseTrigger CBP1_Girl

  6. Bump function Bump() { }

  7. File : CBP1_Girl.uc function Bump( actor Other ) { name = Other.GetPropertyText("Name"); ClientMessage("CBP1_Girl_A::Bump: Bumped Actor " $ name); } Get the name of the Other actor touched Displays the name

  8. WotGreal

  9. Unreal WotGreal UnrealRuntime2Engine UT2004 Textures Scripts Static Meshes Textures Sounds Sounds

  10. Script class CBP1_Girl extends CBP1_Pawn; var string name; function Touch( actor Other ){ } function BeginPlay() { } function Bump (actor Other) { } defaultproperties { … JumpZ=2048.000000 CrouchHeight=72.000000 Mesh=SkeletalMesh'UDN_CharacterModels_K.GenericFemale' }

  11. Unreal & Add-ins Blender Maya 3D studiomax = Character construction UNREAL = UnrealEd + UnrealRuntimeEngine + UT2004 UnrealEd UDE WotGreal = Scripting tool

  12. To Do : • Download and Copy “CBP1” contents replacing existing contents • Download “Maps for Scripting” and copy into “Maps” folder • Check version of Wotgreal before use 3.005 • Only modify of put scripts into CBP1 (or your own folder)

More Related