Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
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
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
event #335325
07/27/10 19:53
07/27/10 19:53
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
i dont know if i get crazy ore not but i am trying to do somthing like this


ENTITY* test_ent;
...

//creation of the entie + waiting some frames

test_ent.event = a_func;


the only thing is it crashes
if i changes this to "my.event = a_func;" it works but if i put it inside a other function i cant use "my" anymore

thx flits


"empty"
Re: event [Re: flits] #335337
07/27/10 20:30
07/27/10 20:30
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
It does work. This does not belong to the Bug Hunt forum.

Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

function random_event() {
	beep();
}

ENTITY* test_ent;

function main() {
	level_load(NULL);
	test_ent = ent_create("palette.pcx",nullvector,NULL);
	test_ent.event = random_event;
}




"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: event [Re: Superku] #335399
07/28/10 09:39
07/28/10 09:39
Joined: Jul 2007
Posts: 959
nl
F
flits Offline OP
User
flits  Offline OP
User
F

Joined: Jul 2007
Posts: 959
nl
ok why doesnt work the same thing here then with your code


"empty"

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