Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (ozgur, howardR, AndrewAMD, exile, Ayumi), 725 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
need a lil help with this #307563
01/30/10 04:00
01/30/10 04:00
Joined: Jan 2010
Posts: 13
USA
The_Unknown_Game Offline OP
Newbie
The_Unknown_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 13
USA
EDIT: ok can anyone please show me how to use the up arrow on the keyboard so i can use the code in my game for a specific job
if any one can please leave a code sample that also explains what does what ty




USE FOR GAME DEV.
GameStudio A7 7.82.3 pro
3D Max 9 for Modeler
Adobe PhotoShop CS4 for art
Brain for thinking
Win XP ser 2 pent 4 3000 mhz 1 GB Ram ATI Radeon 9600 256 mb
Re: need a lil help with this [Re: The_Unknown_Game] #307565
01/30/10 04:54
01/30/10 04:54
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
Wow! You have a lot of problems with your code here.

First, you should NEVER put a semicolon at the end of an "if" statement, like this:

Code:
if(select=0);



Or your code won't work. Period.

Also, the statement "select-50" is just an expression. It does not change the value of "select". To subtract 50 from "select", you have to type:

Code:
select -= 50;



There should not be any declaration for "key_cuu" in your script; that is handled automatically when you include "acknex.h"

Here's something else I should mention:

Code:
if(select = 0)
{
  select = 0;
}



This is redundant. This means: if select is 0, make it 0. Why do we need to do that? "select" is already 0 in case the "if" statement is true.

One last thing; if "select" is a panel pointer, you can't shift it up by subtracting 50 from it. For that, you have to type:

Code:
select.pos_y -= 50;




Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: need a lil help with this [Re: The_Unknown_Game] #307567
01/30/10 05:06
01/30/10 05:06
Joined: Jan 2010
Posts: 13
USA
The_Unknown_Game Offline OP
Newbie
The_Unknown_Game  Offline OP
Newbie

Joined: Jan 2010
Posts: 13
USA
ok let me ask this how do i use the up arrow in my code for it to do a specific job???


USE FOR GAME DEV.
GameStudio A7 7.82.3 pro
3D Max 9 for Modeler
Adobe PhotoShop CS4 for art
Brain for thinking
Win XP ser 2 pent 4 3000 mhz 1 GB Ram ATI Radeon 9600 256 mb
Re: need a lil help with this [Re: The_Unknown_Game] #307571
01/30/10 07:58
01/30/10 07:58
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Code:
// sample function
void sample_fn() {
	while(1) {		// loop for-never
		if (key_cuu) {
			beep;	// <- specific job (unspecified) = beep
		}
		wait(1);	// wait one frame
	}
}

void main() {
	sample_fn();	// call sample function
}



Re: need a lil help with this [Re: testDummy] #307584
01/30/10 11:04
01/30/10 11:04
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
or just call the function when the key is pressed rather than making an event
Code:
void foo(){
   //do your do
   beep(); // beep once
   
   //or keep beeping
   while(key_cuu){
      beep();
      wait(1);
   }
}

void main(){
   on_cuu = foo();
}



Re: need a lil help with this [Re: Redeemer] #307602
01/30/10 13:05
01/30/10 13:05
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Code:
if(select=0)


is not a comparison, but an assignment, and will always evaluate to false.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1