PDA

View Full Version : UScript Problem - UT physics



Sakura
06-08-2012, 10:51 PM
Hello all,

Can someone explain to me, how to use UT Physics in coding? I know how to compile uc files to u files, make and import textures and sounds, and make int files so that they turn into mods. But other than that I'm a noob. I do understand the parent/child relationship of uscript and I know what comes from what.


I'm starting on really basic stuff. I just want to add actual coding to Decorations. Like the Woodenbox, Pottery0, etc.

Can someone give me an example to start off on? It seems that the Actor script has a lot of variables I can use, and I suppose thats the cheat sheet to all of them?

I wanted to start off on getting a vase to bounce. The variable I found for it was this,

var(Movement) bool bBounce; // Bounces when hits ground fast.


How could I use this to add on to a vase? So when I knock it down to the ground it will bounce?

Thanks in advance.

.seVered.][
06-08-2012, 11:23 PM
http://wiki.beyondunreal.com/

http://www.uncodex.com/2012-03/

Banny
06-09-2012, 03:20 AM
Hello all,

Can someone explain to me, how to use UT Physics in coding? I know how to compile uc files to u files, make and import textures and sounds, and make int files so that they turn into mods. But other than that I'm a noob. I do understand the parent/child relationship of uscript and I know what comes from what.


I'm starting on really basic stuff. I just want to add actual coding to Decorations. Like the Woodenbox, Pottery0, etc.

Can someone give me an example to start off on? It seems that the Actor script has a lot of variables I can use, and I suppose thats the cheat sheet to all of them?

I wanted to start off on getting a vase to bounce. The variable I found for it was this,

var(Movement) bool bBounce; // Bounces when hits ground fast.


How could I use this to add on to a vase? So when I knock it down to the ground it will bounce?

Thanks in advance.


Practice makes a man perfect. You might learn a few things from the internet but you have to keep trying. Btw do you know C++ a bit?

|uK|B|aZe//.
06-10-2012, 08:07 AM
talk to feralidragon aka xXx and Higor or Wildcard

Feralidragon
06-10-2012, 08:09 AM
Physics in UT are pretty basic:
- First you have the Physics variable, a constant which you can modify using SetPhysics.
Physics is an enumerator which has:
* PHYS_None: No physics;
* PHYS_Projectile: Physics dictated by velocity and acceleration;
* PHYS_Falling: Physics dictated by gravity;
* PHYS_Rotating: Rotating actor;
* PHYS_Walking, PHYS_Flying, PHYS_Swimming: All related to pawn physics (bots, players, monsters, etc);

There are more, but these are the main ones.

As for bouncing, that can only be achieved through coding that physics into it (by modifying the velocity and overall actor behavior in events like HitWall, Landed, Touch, Bump, etc), so take a look at the Razor2 class for instance (the ripper blade which bounces from walls/floor/ceilings), under Projectile class.

Sakura
06-10-2012, 07:31 PM
Thanks everyone for helping me. I am looking into the information right now. On a good note I added gravity into my decoration. So now it is not in the air anymore ^.^ .