Generic placeable movement, useful?
#1
Posté 17 septembre 2012 - 11:05
With some experimenting I got a generic group of placeables to fall. Then I realized there's no real limit there and I should be able to move and rotate placeables however I programmed in. Would people like to see it developed?
#2
Posté 17 septembre 2012 - 02:32
I can draw a trigger on the ground, and have all placeables with any given string in their tags fall. If a placeable in the trigger does not have the string in it's tag, it does not fall. So for example you could start a tag with "fall_" or "move_" or whatever you want, and just pass that part of the tag to the script. You do not have to code each placeable separately.
The original code is set up only for falling straight down. But M.Reider used vector math (essentially, vector math allow you to add x,y,z coordinates and directions and get a new set of x,y,z coordinates), which allows generating new coordinates anywhere relative to the old position.
The placeables don't actually move, they get rapidly created and destroyed along the series of coordinates laid out by the vector math. This gives the illusion of movement. The code currently only generates a move down along the z axis (and accelerates it to simulate gravity), but changing the code would allow movement along any arbitrary line, and further changing it would allow curved paths (limited by your ability to mathematically describe the path, though you should be able to string together scripts to follow a curve to a spot, then adopt a straight line for example, or to reverse course). The acceleration is likewise currently just a static number but could have math formulas applied, you could make something that oscillates back and forth like a pendulum. Finally, there was no code for the facing of the placeable, code could be added to control facing as well.
Practical example: with all the above, you could make a ship that sailed around in circle. Or a wall that moved back and forth like a Pong paddle. Or an actual "bouncy rock"
#3
Posté 17 septembre 2012 - 05:02
can't say i have an immediate use for it but like the C-ai, I'd store it in my arsenal
#4
Posté 17 septembre 2012 - 05:37
#5
Posté 17 septembre 2012 - 06:14
well maybekamal_ wrote...
... No tilting a house to stick on the side of a cliff.
MDB manipulation tool
#6
Posté 17 septembre 2012 - 08:40
#7
Posté 17 septembre 2012 - 10:21
#8
Posté 17 septembre 2012 - 11:56
We've already got the "throwing boulders" for doing seige projectiles, though this could do a battering ram. Once I get to the point where I can make a placeable move back and forth on the x/y axis I will put in a dynamic walkmesh placeable to test with. The rapid create/destroy might do bad things with a dynamic walkmesh placeable.rjshae wrote...
Perhaps useful for siege projectiles?
Right now I'm working on getting the information for the scripts stored on the trigger. It's not that different from how I did the commoner ai, except a trigger instead of ipoints. So currently I can only make things fall down (actually as of this post I've broken that as I'm abstracting out to the trigger for the variable storage).
#9
Guest_Iveforgotmypassword_*
Posté 18 septembre 2012 - 03:44
Guest_Iveforgotmypassword_*
I was thinking of using an earthquake on the people inside then just teleporting them to a beach but a cutscene would be rather nice. I could jump the PC and his gang under the water into a trigger if that's what's necessary then set the cameras pointing at the ship and make a conversation that you have to click through so there's no chance of swimming off by the player. I just wondered if a ship is too complex to keep deleting and respawning fast enough so it's not jumping about.
#10
Posté 18 septembre 2012 - 04:50
Crashing a ship would be essentially straight line movement of a given distance. That's what the original code does (albeit hardcoded to move down). So from a technical perspective I'd say no problem once I got things working. You could already use M.Reider's original code with minor changes.
#11
Posté 18 septembre 2012 - 05:01
Doing it this way would allow a builder to add custom movement functions, like "figure8" or whatever, and the system would work as long as they wrote a function to describe a figure8.
#12
Guest_Iveforgotmypassword_*
Posté 18 septembre 2012 - 05:32
Guest_Iveforgotmypassword_*
#13
Posté 18 septembre 2012 - 06:10
#14
Posté 18 septembre 2012 - 06:39
#15
Posté 18 septembre 2012 - 10:18
Standard disclaimers about this being unfinished code etc.Tchos wrote...
I'd love to see a video of this in action.
www.youtube.com/watch
I have linear movement in any direction along the x/y axis also working.
Modifié par kamal_, 18 septembre 2012 - 11:13 .
#16
Posté 19 septembre 2012 - 12:55
There was a sinking ship cut scene in the OC that used the ship creature appearance. That's another option for creating moving placeables - especially if they only occur in cut scenes where you can't cursor over the 'creature'.
#17
Posté 19 septembre 2012 - 01:12
This way is more funDannJ wrote...
For a lot of these sort of effects, you could create a model effect that automatically incorporates the movement into it (like the SoZ flock of gulls) rather than use actual placeables. The downside is that the movement direction, rate and distance is then hard-coded into the effect, so it's not as flexible as the scripted solution.
There was a sinking ship cut scene in the OC that used the ship creature appearance. That's another option for creating moving placeables - especially if they only occur in cut scenes where you can't cursor over the 'creature'.
There's lots of creative uses I can think of, slowly dropping spiked ceiling or Star Wars trash compactor style closing wall traps. Make a "can't go backwards" maze by having a placeable follow the pc. Slide placeables out of the way to reveal an opening. Making placeables grow from small to big or vice versa. Putting the player in a "stagecoach" decorated tile and moving placeables past the windows in a square movement to simulate a moving wagon (the players eye will interpret the pc as moving and the placeables as still). Make players chase the button they need to press around the dungeon.
I've added some prelimiary turning, but it is just going to the end of the turn and not showing the intermediate. I've also added some prelimiary code for controlling how long to take for the move, scaling the placeable, and not destroying it at the end of the move, which aren't working yet.
Modifié par kamal_, 19 septembre 2012 - 01:34 .
#18
Posté 20 septembre 2012 - 01:23
#19
Posté 20 septembre 2012 - 01:57
#20
Posté 21 septembre 2012 - 01:48
youtube
Initial Demo:
demo
Initial readme:
readme
Initial erf, includes script, sample placeable and trigger blueprints:
erf
-----------------
edit:
added automatic retagging, so you can place a group of objects in the trigger and they don't all have to have individual tagged, making it easier for a builder to handle groups of objects. Since it adds a tag suffix, no more problem with ensuring the tag doesn't end in a number.
Modifié par kamal_, 22 septembre 2012 - 02:14 .





Retour en haut







