NZC
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[!] Urgent Help.

4 posters

NZC :: theGAME :: HELP

Go down

[!] Urgent Help. Empty [!] Urgent Help.

Post  cruz Fri Dec 11, 2009 6:14 pm

Ask for help here.
Spam and get Banhammer.
cruz
cruz
Admin

Posts : 3
Join date : 2009-12-11

https://tnzc.forumotion.com

Back to top Go down

[!] Urgent Help. Empty Reserved for group announcements

Post  Cuda Fri Dec 11, 2009 6:23 pm

^Just reserving a post

Cuda
Admin

Posts : 3
Join date : 2009-12-11

Back to top Go down

[!] Urgent Help. Empty I NEEDZ HELP PLOX!

Post  iSofakingdom Fri Dec 11, 2009 6:59 pm

ZOMG, it's like i was there.
and there was Java... and numberz... and like i pressed run ands then

BAM!!

Fatal errorz and blue screen.
PLOX HELP ME-ZORZ

Josip
iSofakingdom
iSofakingdom

Posts : 2
Join date : 2009-12-11

Back to top Go down

[!] Urgent Help. Empty Re: [!] Urgent Help.

Post  D3$I_BOI Mon Dec 21, 2009 6:04 am

hey guys
guess what? we forgot 2 load up all da files 2 the forum? so unless tyler or some1 has all the files backed up on a USB we r screwed Sad
D3$I_BOI
D3$I_BOI

Posts : 1
Join date : 2009-12-11

Back to top Go down

[!] Urgent Help. Empty no worries

Post  cruz Mon Dec 21, 2009 7:42 pm

i'm pretty sure he has it all.
if not,
super stealthe mission to infiltrate mayfield. (y)
cruz
cruz
Admin

Posts : 3
Join date : 2009-12-11

https://tnzc.forumotion.com

Back to top Go down

[!] Urgent Help. Empty no time... FML

Post  iSofakingdom Mon Dec 21, 2009 9:22 pm

cool, just bad news from me for now.

i'm packing because i'm leaving for cuba, but i can't find my updated file of this with all the shit commented and i even had the fucker moving up at certain places depending on what number was generated.

so i had alot of functionality but i just fucking lost it.... sooooooo

here is something i wrote reallllylylylyy quick.
it's pretty much the same shite minus comments and minus the number generation to go to specific locations depending on the 'ride' selected.

but it's something you can work with.
well something Immanuel can work with...
just replace the random gen of number that make up the dudes 'decision' with your random generation of number that depends more on probability.

if i find time (or when i get back) i'll finish up the work that will collect data from immanuel's code and go on a ride specific to his personality.

how i had it working before was it just generated a random number for what ride after he decided to go onto a ride.

so yeah. just replace my random numbers with your probability numbers.

F-M-L

Here's the code------------------------------------------------------------------------------------|

import java.util.Random;
import java.io.File;
import java.io.IOException;
public class Person extends AnimatedSprite
{

private long lifespan = 0, timeSinceLastMoodDecrement = 0;
private int HP, money, IP;
private boolean sex = false; //true for male false for female
private int charType = 0; //Gender and character type
int decrementTime = 5000, decrementAmount = 1;
//Time to wait, set by wait() method
protected long waitTime = 0;
private boolean active = true, endoflife = false;
//row of animation to use
protected int animationRow = 3;
//range of numbers for the randomly generated y position
public static int startX = 510, endX = 35;
private int checkS = 0, checkE = 1;
//random Y


static Random g = new Random ();
static int randomY;

public Person (int HP, int IP, int money, File image) throws IOException
{
this.HP = HP;
this.IP = IP;
randomY = g.nextInt (35) + 145;
x = startX;
y = randomY; //random value of 'y' generated within certain perameters

setTileSize (40, 40);
loadSprite (image);

}


//set the person's stats here
public void redrawStats ()
{
Random generator = new Random ();
//HP between 20 and 100
HP = generator.nextInt (80) + 20;
//money between 20 and 80
money = generator.nextInt (60) + 20;
//set the gender
sex = generator.nextBoolean ();

//TODO: set the Y position of the person, so that their locations appear varied
}


//sets the wait time in miliseconds.
public synchronized void setWait (long time)
{
waitTime = time;
}


public synchronized void setActive (boolean b)
{
active = b;
}


public boolean getActive ()
{
return active;
}


public synchronized void setMoney (int money)
{
this.money = money;
}


public int getMoney ()
{
return money;
}


public synchronized void subtractMoney (int amount)
{
money -= amount;
}


public synchronized void addMoney (int amount)
{
money += amount;
}


//josip's time
int d, x = 0, y, time, totTime, testint = 0, decisionTime;
double v = 0.05;
boolean decisionCheck = false, walkingback = false;
public void update (long dt)
{
//preform the below actions only when this person is active
if (active)
{
//lifespan is the total time spent active
lifespan += dt;
//set the time since the last time the HP was decremented
timeSinceLastMoodDecrement += dt;
//Determine if we need to decrement the HP
if (timeSinceLastMoodDecrement >= decrementTime)
{
timeSinceLastMoodDecrement = 0;
HP -= decrementAmount;
}

//Preform some action if the HP is less then zero
if (HP <= 0)
{
active = false;
super.setVisible (active);
}
}

//preform some actions while the person is not waiting, like updating position
if (active && waitTime <= 0)
{
//setRow (animationRow);

time += dt; //time used for animation look
totTime += dt; //time used for the walking look
decisionTime += dt; //time used to decide when a decision is made and moving to the target location
System.out.println ("totTime = " + totTime + "|||Y = " + randomY + "|||testint = " + testint + "|||decisionCheck = " + decisionCheck + "|||y = " + y);

if (time > 80)
{
nextFrame ();
time = 0;
}

if (decisionCheck == false) //making the decision to go onto a ride
{
if (decisionTime >= 2000)
{
decisionTime = 0;
testint = g.nextInt (5) + 1; //generate a random number to simulate a decision to go onto a ride
}
}



if (testint == 3) //if the the sprite decides to go onto a ride
{
if (y <= 100) //once the top position is reached
{
walkingback = true;
// y = randomY;
}

if (walkingback == true)
{
setRow (2);
d = (int) Math.round (totTime * v);
y = y + d;

if (y >= randomY)
{
testint = 0;
walkingback = false;
decisionCheck = false;
}
}
else
{
decisionCheck = true;
setRow (0);
d = (int) Math.round (totTime * v);
y = y - d;
}
}
else if (testint != 3)
{
if (checkS == 0)
{
setRow (3);
d = (int) Math.round (totTime * v);
x = x - d;

if (x <= endX)
{
checkS = 1;
checkE = 0;
}
}

if (checkE == 0)
{
setRow (1);
d = (int) Math.round (totTime * v);
x = x + d;

if (x >= startX)
{
checkS = 0;
checkE = 1;
}
}
}

totTime = 0;
setPosition (x, y);
}
else if (active && waitTime > 0)
{
//do nothing until waitTime is less then or equal to zero
waitTime -= dt;
}
}
}
iSofakingdom
iSofakingdom

Posts : 2
Join date : 2009-12-11

Back to top Go down

[!] Urgent Help. Empty Re: [!] Urgent Help.

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


NZC :: theGAME :: HELP

 
Permissions in this forum:
You cannot reply to topics in this forum