Author Topic: forget this  (Read 842 times)

I'm currently making a Sonic Screwdriver from Doctor Who, using the Keycard as a base, but I'm really new to TS and basically just tinkering with values. How can I make the animation loop? Right now, you click once and the animation plays once but holding it down just keeps it on the last frame.
Current version of code
I'm also going to try to add a texture to the projectile, but I want to try and figure it out myself first.


Keeping topic open just in case someone has a solution, but I seriously doubt it.
« Last Edit: October 20, 2013, 04:18:19 AM by TristanLuigi »

I'd add
Code: [Select]
stateTransitionOnTimeout[4]     = "Fire";
stateTimeoutValue[4]            = 0.1;

This should make it that when it reaches stage 4 it loops back to stage 3 (fire) in 0.1 seconds and then if it reaches stage 4 while the mouse isn't down, it should go on to stage 5 and stop firing. Unless releasing the mouse in stage 3 causes an infinite firing loop, you should be good to go (I assume it wont though)

I'd add
Code: [Select]
stateTransitionOnTimeout[4]     = "Fire";
stateTimeoutValue[4]            = 0.1;

This should make it that when it reaches stage 4 it loops back to stage 3 (fire) in 0.1 seconds and then if it reaches stage 4 while the mouse isn't down, it should go on to stage 5 and stop firing. Unless releasing the mouse in stage 3 causes an infinite firing loop, you should be good to go (I assume it wont though)
What line should I add it to? 4?
EDIT: Okay, I tried it, and the projectile continues to spawn like it should, but the animation gets stuck on the last frame.
« Last Edit: October 20, 2013, 02:24:39 AM by TristanLuigi »

I'd add it next to all the stateName[4]'s and what not for organizational purposes.
Tbh, it could be added anywhere in the ShapeBaseImageData section but that's besides the point

I'd add it next to all the stateName[4]'s and what not for organizational purposes.
Tbh, it could be added anywhere in the ShapeBaseImageData section but that's besides the point
Okay, thanks.
The animation gets stuck on the last frame after playing once, though.
EDIT: Nevermind, I'm stupid. The item was rapid-fire all along, but RotCW only plays once no matter what you do.
« Last Edit: October 20, 2013, 02:27:04 AM by TristanLuigi »

Aah, okay. Did you want it to play RotCW over and over?
If you look at the script you can see that it plcays RotCW only on Prefire (which only happens once)

Aah, okay. Did you want it to play RotCW over and over?
If you look at the script you can see that it plcays RotCW only on Prefire (which only happens once)
Okay, that makes sense.

Hmm, I hate to be so vague, but the weapon just stopped working all of a sudden. I tried reverting the script, but it won't activate the event (although the animations work fine.)
SonicScrewdriver.cs: http://pastebin.com/YVWzsFCC
Event_SonicScrewdriver.cs: http://pastebin.com/e4iBuvbL
EDIT: forget this, copying the code straight over from Keycard doesn't fix the issue.
« Last Edit: October 20, 2013, 04:17:38 AM by TristanLuigi »

Well, I can't see too much wrong with it at first glance. Try putting an echo in the function in event script to see if it even gets there. Start doing some debugging and tell us perhaps what you find out?

EDIT: Looked at the suggestion & request topic. You need to chill out an take a step back. Coding doesn't always work the way you want it to but that's just the life. I've had multi day problems that should have taken just minutes to fix. It happens
« Last Edit: October 20, 2013, 05:17:27 AM by DYLANzzz »

Well, I can't see too much wrong with it at first glance. Try putting an echo in the function in event script to see if it even gets there. Start doing some debugging and tell us perhaps what you find out?

EDIT: Looked at the suggestion & request topic. You need to chill out an take a step back. Coding doesn't always work the way you want it to but that's just the life. I've had multi day problems that should have taken just minutes to fix. It happens
I have the patience of a... well, I can't think of a good brown townogy. Still, I have very little patience and if I get frustrated with something I just give up and play a game or something.

Locking.