News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 11th Aug 2003, 04:35 PM   #1
DannyMeister
UT3 Jailbreak Coder
 
DannyMeister's Avatar
 
Join Date: Dec. 11th, 2002
Location: Bolivar, Missouri
Posts: 1,242
[UT] Timer() in my Decoration not being called

After quite a sabbatical I've had time to start woking on my Mario stuff again. The question block is a Decoration that spawns an item when a pawn bumps a trigger on the bottom of the block. I want the block to be disabled for a certain amount of time, so I call SetTimer(). Well, the function Timer() never seems to get executed. Got a clue?


Code:
class qblock extends Decoration;

#exec mesh IMPORT MESH=qblock ANIVFILE=MODELS\qblock_a.3d DATAFILE=MODELS\qblock_d.3d X=0 Y=0 Z=0
#exec mesh ORIGIN MESH=qblock X=0 Y=0 Z=0

#exec mesh SEQUENCE MESH=qblock SEQ=All STARTFRAME=0 NUMFRAMES=30
//#exec mesh SEQUENCE MESH=qblock SEQ=??? STARTFRAME=0 NUMFRAMES=30

#exec MESHMAP new MESHMAP=qblock MESH=qblock
#exec MESHMAP scale MESHMAP=qblock X=0.1 Y=0.1 Z=0.2

#exec texture IMPORT NAME=QBlockTex1 FILE=MODELS\qblock.pcx GROUP=Skins FLAGS=2
#exec texture IMPORT NAME=QBlockTex1 FILE=MODELS\qblock.pcx GROUP=Skins PALETTE=QBlockTex1

#exec texture IMPORT NAME=QBlockTex_Dark FILE=MODELS\qblockdark.pcx GROUP=Skins FLAGS=2
#exec texture IMPORT NAME=QBlockTex_Dark FILE=MODELS\qblockdark.pcx GROUP=Skins PALETTE=QBlockTex_Dark

#exec MESHMAP SETTEXTURE MESHMAP=qblock NUM=1 TEXTURE=QBlockTex1

var() class<Inventory> PopoutItem;
var() float DeactivateTime;
var qblock_trigger t;

function PreBeginPlay()
{
    local Inventory temp;

    if(DeactivateTime<0.2)
    {
        temp = Spawn(PopoutItem,,,,);
        DeactivateTime = temp.RespawnTime;
        Log("%%%%%%%%% DeactivateTime = "@DeactivateTime);
        temp.Destroy();
    }
    t = Spawn( class'qblock_trigger', self, , Location + vect(0, 0, -15), );

    Super.PreBeginPlay();
}

event Trigger( Actor Other, Pawn EventInstigator ){
    local Inventory item;
    local float angle;
    local float x_v, y_v, Z_v;
    item = Spawn( PopoutItem, , , Location + vect(0, 0, 20),  );
   	item.RespawnTime = 0.0; //don't respawn
	item.SetPhysics(PHYS_Falling);
	item.RemoteRole = ROLE_DumbProxy;
	item.BecomePickup();
	item.NetPriority = 2.5;
	item.NetUpdateFrequency = 20;
	item.bCollideWorld = true;
	item.GotoState('PickUp', 'Dropped');
	angle = FRand()*(PI/2);
	x_v = Cos(angle)*150;
	if(FRand()>0.5) x_v*=-1;
	y_v = Sin(angle)*150;
	if(FRand()>0.5) y_v*=-1;
	z_v = 200 + FRand()*400;
    item.Velocity.X = x_v;
    item.Velocity.Y = y_v;
    item.Velocity.Z= z_v;

    SetTimer(DeactivateTime,false);
    Log("%%%%%%%%% SetTimer("@DeactivateTime@", false)");
    t.SetCollision(false,false,false);
    texture = Texture'QBlockTex_Dark';
    AmbientGlow = 0;
}


function Timer()
{

    Log("%%%%%%%%%%%%%% TIMER");
    t.SetCollision(true,true,true);
    texture = Texture'QBlockTex1';
    AmbientGlow = 96;
}

defaultproperties
{
    DrawType=DT_Mesh
    Mesh=qblock
    CollisionRadius=14.500000
    CollisionHeight=13.000000
    bCollideActors=True
    bCollideWorld=True
    bBlockActors=True
    bBlockPlayers=True
    PopoutItem=class'HealthVial'
    DeactivateTime=0.0
    AmbientGlow=96
}
__________________

UT3 Jailbreak is under development! Forums | Website
DannyMeister is offline   Reply With Quote
Old 11th Aug 2003, 05:22 PM   #2
Mychaeel
 
Join Date: Oct. 3rd, 2001
Location: Frankfurt/Main, Germany
Posts: 3,829
Your Decoration has bStatic set to True. Set it to False instead.
Mychaeel is offline   Reply With Quote
Old 11th Aug 2003, 10:30 PM   #3
DannyMeister
UT3 Jailbreak Coder
 
DannyMeister's Avatar
 
Join Date: Dec. 11th, 2002
Location: Bolivar, Missouri
Posts: 1,242
many thanks
__________________

UT3 Jailbreak is under development! Forums | Website
DannyMeister is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:13 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer