Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,103 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Mouse_ent not working - Help #137852
06/24/07 14:38
06/24/07 14:38
Joined: Jan 2006
Posts: 29
O
oriongu Offline OP
Newbie
oriongu  Offline OP
Newbie
O

Joined: Jan 2006
Posts: 29
Hello,

Sorry to ask such a noob question but this is driving me mad , i just cant get mouse_ent to work.

heres my test code :

Code:

var video_mode = 6; // screen size 800x600
var video_screen = 1;
bmap pcxArrow = <arrow.pcx>;
string world_str = <tets.wmb>;
font standard_font = "ackfont.pcx", 6, 9;
string str_souris;

var mouse_mode = 2;

text txt_souris_x
{
pos_x = 400;
pos_y = 60;
font standard_font;
string str_souris;
flags = VISIBLE;
}


function main()
{
MOUSE_MAP = pcxArrow;
mouse_range = 5000;
level_load(world_str);

wait(1);

display_info();
camera_move();


}


function display_info()
{
while(1)
{
MOUSE_POS.X = POINTER.X;
MOUSE_POS.Y = POINTER.Y;
str_cpy(str_souris, "La souris est sur : ");
if(mouse_ent)
{
str_cat(str_souris, mouse_ent);
}

wait(1);
}
}

function camera_move(){

while (1){
if (mouse_right){
camera.x += mickey.y;
camera.y += mickey.x;
}
wait(1);
}
}




Re: Mouse_ent not working - Help [Re: oriongu] #137853
06/24/07 15:19
06/24/07 15:19
Joined: Dec 2005
Posts: 252
MyOwnKingdom
nipx Offline
Member
nipx  Offline
Member

Joined: Dec 2005
Posts: 252
MyOwnKingdom
mouse_ent isnt a string, its a pointer to an ent.

==>>

Code:

if(mouse_ent)
{
you=mouse_ent; //skill 30 contains your ent's name
temp_str = you.skill30; //not sure about this, havent worked with gstudio for long time...
str_cat(str_souris, temp_str);
}






nipx

Re: Mouse_ent not working - Help [Re: nipx] #137854
06/24/07 15:42
06/24/07 15:42
Joined: Jan 2006
Posts: 29
O
oriongu Offline OP
Newbie
oriongu  Offline OP
Newbie
O

Joined: Jan 2006
Posts: 29
Hello, thanks for your reply.

But engine says to me : Empty pointer in (str_cat(str_souris, mouse_ent.skill30))

By the way , where did you find that skill30 in the manual?

Thanks


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