Deprecated: Function set_magic_quotes_runtime() is deprecated in /usr/www/users/phun/forum/include/common.php on line 58

Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/phun/forum/include/common.php:58) in /usr/www/users/phun/forum/header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/phun/forum/include/common.php:58) in /usr/www/users/phun/forum/header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/phun/forum/include/common.php:58) in /usr/www/users/phun/forum/header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/phun/forum/include/common.php:58) in /usr/www/users/phun/forum/header.php on line 34
Phun - 2D physics sandbox - forum / {Request} ControllerAcc.

Phun - 2D physics sandbox - forum

Official Forum

You are not logged in.

#1 2009-06-17 16:45:55

Jelmerholland
Phun Master lvl. 38 and then some
From: In the middle of fckn nowhere
Registered: 2008-03-09
Posts: 1136

{Request} ControllerAcc.

How can I use this in the script menu? I want to learn this, maybe I can improve my scenes then. Please make an easy tutorial with an example to understand.


Thnx

Offline

 

#2 2009-06-17 16:48:37

Versieon
Respected Member
From: FÜAM (Its a disease!)
Registered: 2009-03-17
Posts: 151

Re: {Request} ControllerAcc.

I just posted a similar topic in the help/bug section, hopfully something comes up.


Ah...so many pedestrians, so little time...

Offline

 

#3 2009-06-18 12:32:56

RA2lover
Post Addict
From: Brazil
Registered: 2009-02-08
Posts: 681

Re: {Request} ControllerAcc.

ControllerAcc is the value for an object's controller acceleration in m/s, hovewer, almost all people which script them use it as a way to store data. my AK-47 uses it as a method to tell the ammo remaining in clip

Offline

 

#4 2009-06-18 12:34:28

Jelmerholland
Phun Master lvl. 38 and then some
From: In the middle of fckn nowhere
Registered: 2008-03-09
Posts: 1136

Re: {Request} ControllerAcc.

HOW?? How does it tell? please give me an example... an easy one

Offline

 

#5 2009-06-18 13:37:27

Paradigm 29
Spoonman!
From: Houston, Texas
Registered: 2008-07-22
Posts: 1565

Re: {Request} ControllerAcc.

Jelmerholland wrote:

HOW?? How does it tell? please give me an example... an easy one

For on collide do something like:  ControllerAcc = ControllerAcc +1

Now every time that object hits something it's controllerAcc variable goes up one.  You can then use that variable to tell the object to do something else.  The only thing about this that's better than custom variables is that you can clone the object and it's clone can do the same thing without having to make a new custom variable.


http://i42.tinypic.com/24y8sax.png

Offline

 

#6 2009-06-18 14:29:09

Versieon
Respected Member
From: FÜAM (Its a disease!)
Registered: 2009-03-17
Posts: 151

Re: {Request} ControllerAcc.

Ok, how would you use that variable to set a hinge speed then??


Ah...so many pedestrians, so little time...

Offline

 

#7 2009-06-19 16:42:37

RA2lover
Post Addict
From: Brazil
Registered: 2009-02-08
Posts: 681

Re: {Request} ControllerAcc.

its impossible to set a hinge speed using only controlleracc. you need a scene.my variable to do so, unless you manage to make a VERY complex collision group array

Offline

 

#8 2009-06-19 16:44:30

Versieon
Respected Member
From: FÜAM (Its a disease!)
Registered: 2009-03-17
Posts: 151

Re: {Request} ControllerAcc.

dang.........
ok, then is there a way to define a custom variable without typing it into the console? (phunlet safe?)


Ah...so many pedestrians, so little time...

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson

Phun and Phunland.com is copyright of Algoryx