Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
pstigerid
pstigerid's Profile
5
Posts
6
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Bug? Append command used with long[].
[2 Replies]
04-Dec-2012 12:46 PM
Forum:
General Discussion
Hi forum,
I think I found a bug. The following works:
int[] w = {};
w = append(w,4);
//-----------
String[] x = {};
x = append(x,"Test");
//---------
float[] y = {};
y = append(y,4);
While this doesn't work:
long[] z = {};
z = append(z,4);
Should this not be a bug please explain to me my error.
Thank you!
PStiger
if key down for 3 seconds
[2 Replies]
30-Dec-2011 01:21 PM
Forum:
Programming Questions
Hi Forum,
How could I make processing do something when any key has been pressed for longer than 3 seconds?
Thx
PStigerID
Change (close one and open&run another) Processing file.
[5 Replies]
27-Dec-2011 08:18 AM
Forum:
Programming Questions
Hi Forum,
I guess closing one is easy, just use
exit();
But how can I get Processing to open and run another pde (not an applet). Is this possible?
I cant just forward it to a website where I saved the applet because I am using this Library TTS.
This would need to run in Windows and Ubuntu, not Mac.
Thank you
-PStiger :)
Delay in a void
[4 Replies]
23-Dec-2011 09:55 AM
Forum:
Programming Questions
Hi,
I don't get why this is not working. I know that the delay function is not ideal, but I don't know an alternative...
This is a little bit more complicated. We got a code from our teacher with which we could work. This is what you need to know to understand the code:
rfR is a sprite.
display displays the sprite at a given point (this point is not given in the code below)
hit gets the width and height of playerR and rfR and checks if they overlap.
What doesn't work? The delay function seems to stop the whole program, not just the void. Is this normall?
Heres the simplified code:
int r2, powerup;
void setup()
{
size(500, 700);
frameRate(5);
r2 = (int)random(8258, 16789);
powerup = powerup = (int)random(7890,19321);
} //end setup
dispRFr = 0; //display rfR when this = 1
spL = 5;
void draw()
{
if(millis()>=r2)
{
dispRFr = 1;
}
if(dispRFr == 1)
{
rfR.display();
if(playerR.hit(rfR))
{
spL += 10;
dispRFr = 0;
rfRwait();
}
}
} //end draw
void rfRwait()
{
delay(powerup);
spL -= 10;
}
Thx for the help
-PStiger
Random in if
[3 Replies]
22-Dec-2011 02:10 PM
Forum:
Programming Questions
Hi Forum,
I cant get this part of my program to work. What am I doing wrong? Do I need to "start" the millis somehow?
if(millis()<=random(8258,16789))
{
somecrap
}
So after 8258-16789 milliseconds "somecrap" is suppost to happen. It is not :(
Processing is not giving me any errors...
Thx in advantage :)
-PStiger
«Prev
Next »
Moderate user : pstigerid
Forum