Page 1 of 1

push objects ingame + gravity + explosions

Posted: April 4th, 2012, 3:01 am
by doctorface
hey guys first post

im making my first game with sandbox, im an experienced user of gamermaker, ive made lots of 3d games as well as FPS and RPG's etc with it all pretty basic and non pollished, now im trying this, i really like how easy it is to make the landscape and to import models etc im just struggling with the config file commands of objects (presuming this is where you code the objects to responde differently? or tell me where the coding needs to be implemented)

3 things i want to do to start off or direct me to tutorials please

1 i want my object to be able to be pushed if i walk into it (push a box along a flat ground)

2 i want my object to fall (needs gravity effect)

3 (might be hard to create in sandbox), i want to make an explosion (not the image but the actual event) in which items in a radius are forced away from the explsion effect

now if i added an explsion effect next to a box with both gravity and the abuilty to be pushed i would think it would fly away and then land....now with game maker this would be a very simple effect to make so im presuming it can't be to hard?

i thing i can't manage to find but there is one with gamemaker there was a command directory so if you wanted to do anything you could check this help file with every command available for scripts, i can't manage to find one?

also sorry for keep bringing up gamemaker, i really do like sandbox alot better it looks amazing and so easy to landscape, gamemaker seems more user friendly for noobs is all

thanks for reading

Re: push objects ingame + gravity + explosions

Posted: April 4th, 2012, 8:22 am
by kddekadenz
Most people started developing games using gamemaker, me too ;)

You can create in FPS mode boxes(pushable,gravity) and barrels(same but explode), where you can choose the models.
BUT: this will only happen when they get damaged. And the developers of PAS removed weapons from the original Sauerbraten Engine, to make it kidfriendly.
There is currently a project called 'Water Wars' which will reimplementing weapons.

For command directories check the wiki ('Advanced Topics')

Re: push objects ingame + gravity + explosions

Posted: April 4th, 2012, 9:42 am
by Sircameron
For the explosion you can add

Code: Select all

r_item_use kickback # /// # = 1-1000?
r_item_use radius # // # = 1-1000
in the item .cfg for the item you want to have the explosion

Re: push objects ingame + gravity + explosions

Posted: April 4th, 2012, 10:32 am
by kddekadenz
^--- RPG Mode

Re: push objects ingame + gravity + explosions

Posted: April 4th, 2012, 11:56 am
by Sircameron
Yea sorry that was for RPG mode.. But if you're editing the .cfg file for each model there's links to the "cubescript model reference" all over the forums, and in the tutorials with a list and descriptions for each setting/command for each model format

Re: push objects ingame + gravity + explosions

Posted: April 4th, 2012, 9:01 pm
by Hirato
In the RPG you can push NPCs and items around by walking against them.
You can also push obstacle entities, BUT you'll need to give it the OBS_MOVABLE flag as follows

Code: Select all

r_obstacle_flags $OBS_MOVABLE
Part of the idea behind the "obstacle" entities is to block off paths and things, so it's not on by default.

Re: push objects ingame + gravity + explosions

Posted: April 5th, 2012, 2:33 am
by doctorface
hey thanks everyone.

how do you attatch an entity (box) to a model? i feel real dumb for asking this as it seems like it should be a simple as thing. I just search and search and can't find a tutorial. i can find jump pad but thats literaly put the model over top of the entity and it won't move so different situation.

please help thanks for your patience