May 23, 2012, 01:12:49 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: A "force" object  (Read 349 times)
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« on: May 18, 2009, 04:44:57 PM »

Hi guys!

I want to create an object that will be invisible but when you come close it, it will add a force on you so you basically fly away. How would i go about it?

I made a box and added a .gsl file that only contains this line:

Quote
GetGameManager().GetWorld().AddAreaForce(object.GetPosition(), 20, 100);

But there has to be more to it Smiley
Logged
Ransom
Full Member
***
Posts: 132



View Profile
« Reply #1 on: May 19, 2009, 07:32:19 AM »

Try this

Quote
void DynamicsAdvance( Object@ object, float seconds)
{

GetGameManager().GetWorld().AddAreaForce(object.GetPosition(), 20, 100);
}
Logged
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #2 on: May 19, 2009, 08:17:16 AM »

I am at work and will test later but I can tell you something else I tried.

I found a destructable.gsl file that seems to have forces and stuff.

I found in the file that there is a "set to 1 if you want to trigger at collision with another object" and tried this. Added some force, added on collision but nothing happened. I used it on a normal editable box. I thought that when touching it, it would make my ball fly away.

I found a really cool thing I have not seen before. When adding and object and associating a .gsl file to it it automatically adds the controller setting thingys in the opr, so you then jus adjust the input values. Great stuff
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!