Script wanted please (OV/Crazy perhaps? ;) ) -1 reply

  • 1
  • 2

Please wait...

SathiroN

< I met Jesus once.

50 XP

13th January 2004

0 Uploads

158 Posts

0 Threads

#1 10 years ago

Whilst I like to do as much on my own as possible this is one thing that goes way over my head and I don't think I can learn this at the moment lol.

I think the script I want is simple here's what I want it to do.

I have a shader with an animap and want the script when triggered to run the animap and stop at the end frame... When re-triggered it will play the animap in reverse.

So use: plays frames 1 to 10 use again: plays frames 10 to 1

If it's not possible could it be

use: plays frames 1 to 10 use again: playes frames 1 to 20?

I would be very much in appreciation if someone could knock this script up and of course I would include thanks in my Readme (:

Cheers




NAB622

EAT ME!

50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#2 10 years ago

Is this MP or SP?

There is a better way to do it than using an AnimMap shader. How many FPS does your AnimMap run at? As long as it's 5 fps or less, it's possible with decent smoothness in MP. In SP, anything will go.

What I would do is create 10 different func_walls, and program the script to "use" them when they are needed. (Func_wall will toggle on and off - basically, you can have the wall there, and when used, it will disappear completely.)

Of course, you will probably need more information, so please post back if anything is unclear.

Seto and BobaFett know more about this type of scripting than I do, so if either of them post, take their word over mine.




~*Seto*~

Trapped in the interchet

50 XP

19th October 2007

0 Uploads

334 Posts

0 Threads

#3 10 years ago

I'm not an expert on actual shader creation or the workings of shader parameters, but am I correct to say that what you want could be accomplished by having one shader that animates, a second shader that also animates but in a different (reverse) way, and then maybe a third shader to just represent an idle (non-animated) state? Because if so, it seems to me that shader remapping could handle all of it with just 3 ents (yes I love shader remapping =p), plus a simple script to control the use.

Can someone confirm or deny my assessment of the shader functionality, since as I said I don't know the details of shader parameters.




SathiroN

< I met Jesus once.

50 XP

13th January 2004

0 Uploads

158 Posts

0 Threads

#4 10 years ago

Thank's guys reading both of your posts has put something that has been out of my head for a while.... LOGIC.

Will try something out and let you guys know how it goes :)




SathiroN

< I met Jesus once.

50 XP

13th January 2004

0 Uploads

158 Posts

0 Threads

#5 10 years ago

hmmm I think it may be because I am getting tired and now I'm running the risk of being a pain. Nab622 its a piece of patch mesh that I want the "animation" to occur with the animation looks like shutters closing.. with about 16 textures to achieve it. I tried to just fire off a func_usable with my animation on it but the animation is animating regardless of the brush being on or off so when I switch it, it could already be half way through etc.

What I think I now need is something that when triggered fires off the aniMap from frame 1 through to frame 8 and when triggered again would go from frame 8 to 16 (16 being identical to 1)

So use: frame 1 to 8 use again: frame 8 to 16

use again frame 1 to 8 use again: frame 8 to 16 ect... You get the idea.

Sorry if I seem patronising with my double explanations, not very confident with my words in this tired state heh

Seto I think you got me thinking on the right path




Crazy Assassin

Overlord of Various Things

50 XP

25th August 2008

0 Uploads

428 Posts

0 Threads

#6 10 years ago

Shutters closing?

Post a screenshot of your patch with a bit of the surrondings. Unless I'm mistaken, it would be easier to make some brushes and move them rather than use a shader.




NAB622

EAT ME!

50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#7 10 years ago

Yeah, shutters closing is very easy with a simple rotate script. Any of us three (and some other people that haven't posted) can easily help set you up with one if you're unsure how to do it.




~*Seto*~

Trapped in the interchet

50 XP

19th October 2007

0 Uploads

334 Posts

0 Threads

#8 10 years ago

Agreed on brushes being easier (plus me knowing more about them :p), but I think the OP already has the shaders created? My idea anyways was to have the shutters start with some idle shader on, then just use a script to activate shader remaps on demand to change that shader into either the open animation one, or the closing animation one as appropriate. Guess we'll just see what he says.




SathiroN

< I met Jesus once.

50 XP

13th January 2004

0 Uploads

158 Posts

0 Threads

#9 10 years ago

Seto that's exactly what I want!!! please please help me to achieve this and I will possibly love you dearly (My attempt at being humble and begging!)

Crazy, no screenshots as yet but all it is, is a curved patc/skewed bevel, due to the confines and shape I want it would be pretty damn hard to use brushes not to mention I would need a hell of a lot of them! Cheers though (:




NAB622

EAT ME!

50 XP

8th October 2005

0 Uploads

6,921 Posts

0 Threads

#10 10 years ago

This may help get you started, if you haven't seen it yet: Basic Scripting - NAB622's Website

If you need help from us, I would suggest you copy and paste the shutters and window into a new map, and provide a few screenshots. It makes it easier to understand what you're talking about,




  • 1
  • 2