Aller au contenu

Photo

Placeable movement system


  • Veuillez vous connecter pour répondre
15 réponses à ce sujet

#1
kamal_

kamal_
  • Members
  • 5 254 messages

I was inspired by something in Wizard's Apprentice 2, and the movement system some PW's have. I implemented a placeable movement system by abstracting TWA 2's hardcoded script, so credit M. Reider not me. How it works is by rapidly creating and destroying placeables along the path. There is only the documentation built into the single script.

 

Youtube video. Demo show rotation, resizing, movement in all three dimensions, and acceleration of movement.

 

Dropbox link to proof of concept demo module.



#2
PJ156

PJ156
  • Members
  • 2 985 messages
That looks good, I remember MR used this a lot for placeable interaction.

It will be good to have this available. Thanks Kamal_

Matt will be pleased it is being used.

PJ

#3
rjshae

rjshae
  • Members
  • 4 497 messages

It's just too bad we can't use SetScriptHidden on a placeable.



#4
Tchos

Tchos
  • Members
  • 5 063 messages

It's just too bad we can't use SetScriptHidden on a placeable.

 

Is it possible to apply an alpha-modifying SEF to a placeable?



#5
4760

4760
  • Members
  • 1 212 messages

Why not scale it down to 0,001;0,001;0,001?


  • rjshae aime ceci

#6
kamal_

kamal_
  • Members
  • 5 254 messages

This proof of concept module is something I whipped up in December 2012 according to the file date, I don't remember anything about it other than it works. If you took apart Crimmor to look at things, you might notice that this demo uses the script prefix of sh_ that I used for Crimmor. Obviously I was testing for use in Crimmor but don't even remember what trickery I planned on using it for. So consider it unsupported, I'll answer questions as best I can but most answers are going to be "I don't remember why".



#7
rjshae

rjshae
  • Members
  • 4 497 messages

Is it possible to apply an alpha-modifying SEF to a placeable?

 

There looks to be a way to do that, but I haven't had much luck applying SEF to placeables. Not sure why.

 

Why not scale it down to 0,001;0,001;0,001?

 

Good idea!



#8
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Why not scale it down to 0,001;0,001;0,001?


Hi,

This is what I do with everything I need to "disappear" immediately. :)

I have used in it *many* scripts.

Lance.

#9
kevL

kevL
  • Members
  • 4 070 messages

it works in reverse too.



#10
4760

4760
  • Members
  • 1 212 messages

Exactly. Depending on how you progressed, some variables are given different values which in turn define which placeables show up next time you enter the area...



#11
kevL

kevL
  • Members
  • 4 070 messages

btw, have you tried scale: 0.0;0.0;0.0 ?

 

it worked for me on one (unrelated) test (ie. by accident ..)

 

 

that is, the game didn't crash and the placeable worked as intended ...



#12
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

btw, have you tried scale: 0.0;0.0;0.0 ?
 
it worked for me on one (unrelated) test (ie. by accident ..) 
 
that is, the game didn't crash and the placeable worked as intended ...


Hi KevL,

The reason to use 0.001, 0.001, 0.001 as opposed to all the zero's is so you can use the same function to make it reappear again! :) It's a great way to make something both disappear and then reappear. If you only want it to disappear then using all zero's will work from what I see. i.e. I have not been successful making a 0.0,0.0,0.0 object reappear when using SetScale 1.0,1.0,1.0 to reverse such a descaled object. You can reverse a descaling when using 0.001,0.001,0.001. And it's a great facility!

Cheers,
Lance.

#13
kevL

kevL
  • Members
  • 4 070 messages

interesting, Tks Lance.



#14
rjshae

rjshae
  • Members
  • 4 497 messages

It'd be interesting to run a comparison between the two approaches and see if there is a visual and/or performance difference. If the scaling approach is significantly faster, you might be able to use more hops for smoother animation.

 

Another approach could be to use a placed visual effect, then keep creating and tearing them down. It might be lower overhead, but it would need a custom sef file for each object.



#15
Dann-J

Dann-J
  • Members
  • 3 161 messages

One way to make models move is to create a model VFX and use it as a spell projectile. The downside is that I've never been able to figure out how to slow the projectile down, so it's either super-fast or nothing. It's fine for flying wyverns or flocks of birds (both of which I've done successfully), or even perhaps a cloud of arrows shot from an unseen army of archers.

 

Another way to make things rotate is to create a model VFX, apply it to an ipoint, then script the ipoint to rotate in small intervals. You could only rotate it around the Z axis though. A collision box or ball could be used to allow the player to interact with the VFX.



#16
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

One way to make models move is to create a model VFX and use it as a spell projectile. The downside is that I've never been able to figure out how to slow the projectile down, so it's either super-fast or nothing. It's fine for flying wyverns or flocks of birds (both of which I've done successfully), or even perhaps a cloud of arrows shot from an unseen army of archers.
 
Another way to make things rotate is to create a model VFX, apply it to an ipoint, then script the ipoint to rotate in small intervals. You could only rotate it around the Z axis though. A collision box or ball could be used to allow the player to interact with the VFX.


Hi DannJ,

Did you see the way NWN1 SoU did it with the "KOBOLDS AND THE WELL"?

In fact, that was a very clever piece of scripting that combined usage of everything we are discussing in this post I believe.

I started to look at that code a few eeks ago when my wife played the game and encountered that scene. I noticed something about spell projections then.

EDIT: Could not resist your wyvern code and have downloaded that to take a look too. :)

Lance.