If you don't know what's causing it then ask for help, no use rolling your face around in a bucket of mud when asking online can help you set up a real apple bobbing game.HiPoyion":3jt5t5fa said:Was attempting an code.
Was getting random errors. Not sure if it's my fault or the outdated version of processing that causing it. Either way. Meh.
Processing is rather Java-like and it's keyword list matches with Java so you can use the code tag withHiPoyion":1vedv0wd said:So I managed to code a base for map transitions! Super happy right now!
(I think some indentation or some shit is off, but right now I'm done with it. I'll make it look pretty another time.)
]...[[/size]/code]
[code=java]<div class="java" id="{CB}" style="font-family: monospace;"><ol><span style="color: #993333;">void proc_func() {
<span style="color: #993333;">int number = <span style="color: #cc66cc;">2;
player.x = number;
proc_call_test( <span style="color: #cc66cc;">2, player );
}
<div class="java" id="{CB}" style="font-family: monospace;"><ol>
<span style="color: #000000; font-weight: bold;">class BBox {
<span style="color: #000000; font-weight: bold;">private PVector min;
<span style="color: #000000; font-weight: bold;">private PVector max;
BBox( <span style="color: #993333;">int x, <span style="color: #993333;">int y, <span style="color: #993333;">int width, <span style="color: #993333;">int height ) {
min = <span style="color: #000000; font-weight: bold;">new PVector( x, y );
max = <span style="color: #000000; font-weight: bold;">new PVector( x + width, y + height );
}
<span style="color: #993333;">boolean IsTouchingBBox( BBox other ) {
<span style="color: #b1b100;">if ( min.x < other.max.x && min.y < other.max.y ) {
<span style="color: #b1b100;">if ( max.x > other.min.x && max.y < other.min.y ) {
<span style="color: #000000; font-weight: bold;">return <span style="color: #000000; font-weight: bold;">true;
}
}
<span style="color: #000000; font-weight: bold;">return <span style="color: #000000; font-weight: bold;">false;
}
<span style="color: #993333;">boolean IsPointInside( PVector point ) {
<span style="color: #b1b100;">if ( point.x > min.x && point.x < max.x ) {
<span style="color: #b1b100;">if ( point.y > min.y && point.y < max.y ) {
<span style="color: #000000; font-weight: bold;">return <span style="color: #000000; font-weight: bold;">true;
}
}
<span style="color: #000000; font-weight: bold;">return <span style="color: #000000; font-weight: bold;">false;
}
}
BBox teleportZone = <span style="color: #000000; font-weight: bold;">new BBox( <span style="color: #cc66cc;">305, <span style="color: #cc66cc;">255, <span style="color: #cc66cc;">1, <span style="color: #cc66cc;">1 );
// teleportZone.IsPointInside( new PVector( player.x, player.y ) );
BBox playerBox = <span style="color: #000000; font-weight: bold;">new BBox( player.x, player.y, <span style="color: #cc66cc;">1, <span style="color: #cc66cc;">1 );
// teleportZone.IsTouchingBBox( playerBox );