Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
1 registered members (1 invisible), 857 guests, and 10 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
Page 2 of 2 1 2
Re: Fog of War ( AUM ) problem [Re: Espér] #241783
12/18/08 20:45
12/18/08 20:45
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Try this...

Code:
var mouse_move[3];

var bodentiles[4000];
var bodentiles_start = 0;
i=0;                       //<<<<<ONLY CHANGES
while (i < 4000)           //<<<<<ONLY CHANGES
{
   bodentiles[i] = 0;
   i += 1;
}
or try
Code:
var mouse_move[3];
var bodentiles[4000];
var bodentiles_start = 0;
var xx;  for(xx=0; xx<4000; xx++)  bodentiles[xx] = 0;



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Fog of War ( AUM ) problem [Re: EvilSOB] #241951
12/20/08 13:55
12/20/08 13:55
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
the problem is, that i can´t do this:

Code:
function object_fow()
{
	// Aktionen für den Kriegsnebel
	my.tilt = 90;
	my.alpha = 100;
	set(my,TRANSLUCENT);
	set(my,PASSABLE);
	while (1)
	{
		i=0;
		if(i < 4000){i += 1;}else if(i == 4000 || i > 4000){i = 0;}
		if(vec_dist(bodentiles[i].x, my.x) <= 350)
		{
			while(my.alpha >= 5)
			{my.alpha -= 3;wait(1);}
			ptr_remove(my);
		}
		wait(5);
	}
}



Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Fog of War ( AUM ) problem [Re: Espér] #242007
12/20/08 19:04
12/20/08 19:04
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Code:
// bad sample only

var i = 0;

ENTITY* bodentiles[4000]; // check syntax (Lite-C)
ENTITY* e1 = NULL;
VECTOR* fow_v1 = {x=0;y=0;z=0;}  // update this position with player / camera
function fowf_clear() {
	for(i=0; i<4000; i++) {
		if (bodentiles[i] != NULL) {
			e1 = bodentiles[i];
			ptr_remove(e1);
			bodentiles[i] = NULL;
		}
	}
}
function fowf_create() {
	for (i=0; i<4000; i++) {
		if (bodentiles[i] == NULL) {
			e1 = ent_create(<s?>, v?, f?);
			bodentiles[i] = e1;
		} else {
			e1 = bodentiles[i];
		}
		set(e1, TRANSLUCENT);
		set(e1, PASSABLE);
		e1.tilt = 90;
		e1.alpha = 100;
	}
}
function fowf_fadeOut(ENTITY* _e) {
	if (_e == NULL) { return(0); }
	_e.skill22 = 222;
	while(1) {
		if (_e == NULL) { break; }
		if (_e.alpha < 5) { break; }
		_e.alpha -=7 * time_step;
		wait(1);
	}
	if (_e != NULL) { ptr_remove(_e); }
}

function fowf_go() {
	var n1; n1=0;
	while(1) {
		n1 %= 4000;
		e1 = bodentiles[n1];
		n1 += 1;
		if (e1 != NULL) {
			if (vec_dist(e1.x, fow_v1) <= 350) {
				if (e1.skill22 != 222) {
					fowf_fadeOut(e1);
				}
			}
		}
		wait(1);
	}
}


Re: Fog of War ( AUM ) problem [Re: testDummy] #261975
04/21/09 12:07
04/21/09 12:07
Joined: Jan 2009
Posts: 38
Anonymous2009 Offline
Newbie
Anonymous2009  Offline
Newbie

Joined: Jan 2009
Posts: 38
Which AUM issue is that from?

Page 2 of 2 1 2

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