| Blockland Forums > Modification Help |
| ETA |
| << < (2/3) > >> |
| ThinkInvisible:
$playerSpeed = mFloor(mAbs(getword(serverconnection.getcontrolob ject().getvelocity(),0)) + mAbs(getword(serverconnection.getcontrolob ject().getvelocity(),1)) + mAbs($playerZspeed)); $playerZSpeed = getword(serverconnection.getcontrolob ject().getvelocity(),2); |
| Kalphiter:
Why are you trying to take the absolute value of a variable that hasn't yet been assigned Do this: %vel = serverConnection.getControlOb ject().getVelocity(); %x = getWord(%vel, 0); %y = getWord(%vel, 1); %z = getWord(%vel, 2); %speed = vectorLen(%vel); |
| ThinkInvisible:
that's not in actual order but dist/speed using that goes insanely fast around 5 or 6 seconds per actual second and i can't use local variables because the GUI uses the values |
| Kalphiter:
--- Quote from: Kalphiter on June 10, 2012, 11:44:49 AM ---%vel = serverConnection.getControlOb ject().getVelocity(); %x = getWord(%vel, 0); %y = getWord(%vel, 1); %z = getWord(%vel, 2); %speed = vectorLen(%vel); --- End quote --- |
| ThinkInvisible:
i am such an idiot i was using the distance instead of distance/speed in the display but it still goes crazy fast unless you move at a constant speed. average speed, right? |
| Navigation |
| Message Index |
| Next page |
| Previous page |