dim3 Forum

Full Version: horizontal gravity, is it possible?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Having had a splendid and very helpful response to my last query, thought I'd go ahead and push my luck.
Here is the thing,
My game concept involves traveling along a river on a raft.
What I want to do is ad a current to the river upon which the raft travels.
A kind of horizontal gravity if you will.
Is this possible? As a simple command?

I would again point out how ace this site is.

Off topic- I've recently moved from Devon to London, the main difference being, Foxes are fatter here.
It's not possible to set a value for horizontal gravity... yet.
There should be a workaround though.
If you want an object to move continuously, use
Code:
obj.motionVector.go();
This will make it go forward until... until you stop it, I guess.
Now if you want to change the speed, you can use
Code:
obj.motionVector.alterSpeed(speed);

If you could explain what exactly you want to achieve, it would be easier to help you.
You might also want to come to the IRC channel. (#dim3 on irc.freenode.net)
I'm (almost) always there. Smile
Thanks again Bink.
That will enable me to have objects drifting along the river which is part of what I'm trying to achieve.
The other part is the effect on the players movement. As I mentioned the player in this concept will control a raft. I'm not using a liquid for the river, it's just a floor tile with an animated texture to simulate the flow of the river and the river continuously flows in one direction so, I want to set it up so that the player will move quickly in one direction (downstream) and slowly in another (upstream). Basically I want to have a variable max speed depending upon which direction the player moves on the z axis. If that makes sense.

Can't seem to get to the irc channel, I'll keep trying.

Cheers,

Dom.
You CAN do this.
Use
Code:
map.object.shove(id,xAngle,zAngle,yAngle,speed);                       Shove an object by angle and speed
map.object.shoveDirect(id,xMove,zMove,yMove);                         Shove directly in a direction
in a loop Wink. (don't make the loop to fast, try shoving it every 5 seconds in a shove that lasts 5 seconds or something)
Great, not encountered these commands before and can't pretend that I fully understand but, at least I now have something to work with. Thanks so much ccccc!
They're in the docs Wink. Go to the docs (in the docs folder, open the index file in a web browser) and then go to scripting>map object Wink.
Got it, you've solved my problem and saved me a lot of time, nice one. I'm glad this can be done as I was starting to consider building a map on its side, which would have been a crazy way to go about things.
DomReardon Wrote:That will enable me to have objects drifting along the river which is part of what I'm trying to achieve.
Note that you could also use nodes to make the objects drift. I did this a long time ago with Blood Rush: http://web.mac.com/mkjonathan/iWeb/Blood..._Rush.html
take a look at it to see how it works.

Basically you need to make 2 or 3 nodepaths with your objects randomly following the nodes. What I also did is making the objects return behind the player when they move too far away. This avoids having too many objects in your map.
Great game!
Not a million miles from what I'm trying to do and very inspiring!
Using nodes may well be the best way for me to go and making objects return behind the player is definitely an idea I'll use, thanks Ramauld.

Dom.
Dom, go to this link please. Check the last post. http://www.idevgames.com/dim3/showthread.php?tid=2069
Smile If you need help with uploading them I'll be glad to help.
Reference URL's