View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:53 am



Reply to topic  [ 1 post ] 
 Using Timers or adding step delays in a pie menu option? 
Author Message
User avatar

Joined: Sat Jul 31, 2010 10:01 pm
Posts: 42
Reply with quote
Post Using Timers or adding step delays in a pie menu option?
I'm not sure of the best way to describe what I'm after, but essentially, I have a toggling pie menu button.
When the button is toggled, it's meant to animate up through 3 frames on an attachable then change the actors sharpness to 1, or animate down through 3 frames and change sharpness to 0.
The rest of the script in update(self) makes the frame-by-frame changes I want to the actors motion if sharpness is 1, and that's working fine. So is the toggling.

The problem seems to be, I don't seem to be able to make the pie-triggered part of the script keep running past a single frame.
Is there any way around this besides moving the (brief, and only on toggle) animation into update(self) as well?

Here's the relevant part of the script. The text message for a missing wing isn't working either, but that's probably because it returns an error and stops the code if the attachable isn't picked up by the ID sweep, rather than passing through as a false.


It doesn't work if I try doing:

for i = 1, 3 do
if actor.FrameTimer:IsPastSimMS(50 * i) then
actor.Wing.Frame = i;
end

either. Am I just making a really stupid mistake somewhere? I'm pretty sure triggering via the pie menu skips the Create(self) and Update(self) sections.

EDIT: The else section for turning off the stabilizer doesn't include the steps down here, but ideally it will, it's just that it wasn't working on the way up so it seemed silly to break it going down as well.


Sat Jun 16, 2012 2:43 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.066s | 13 Queries | GZIP : Off ]