View Full Version : Native Tick + UnrealScript
byteasc
11-08-2009, 07:47 PM
It has been awhile, so I'm trying to rebrush up on my UnrealScript which I've forgotten alot of lol.
I'm trying to fix up a UIScene class that will be Ticked. I know that the UTUIScene provides Tick to the widgets, but since its native declared, I don't remember the proper way to allow my script to get involved with Tick (so that the script will also be ticked).
Thanks!
Shambler
11-09-2009, 09:38 PM
At a glance, there seems to be a new interface in the UDK which allows you to tick UI objects: UITickableObject.uc and UITickableObjectProxy.uc
It looks like you should create a UITickableObjectProxy object in your UI class and hook its 'OnScriptTick' delegate (or base your UI class on UITickableObjectProxy and use 'ScriptTick'), then call UIScene::RegisterTickableObject and UIScene::UnRegisterTickableObject at the appropriate locations within your UI class (not sure where is best).
Be careful to make sure you reuse UITickableObjectProxy references, instead of creating new ones each time the menu is opened.
LennardF1989
11-10-2009, 11:45 AM
Modify UTUIScene_Scoreboard, it has TickScene, which, with some smart coding, can be delegated easily.
byteasc
11-10-2009, 02:36 PM
I had saw the Interface, but also saw that UTUIScene implemented Tick natively, but wasn't sure on implementation of tick in Children of UTUIScene. I'll look at the Scoreboard when I get home tonight.
Although I mostly figured out what I wanted with Main Menu scene stuff
thelaw
12-08-2009, 05:38 AM
Had the same problem and solved it like this http://forums.epicgames.com/showthread.php?t=710970
Powered by vBulletin® Version 4.1.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.