Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Reselect Unit hell & el [Re: Uhrwerk] #203167
04/20/08 04:45
04/20/08 04:45
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
 Code:
// el.dll (entity list .dll example)
// theory | example only....not tested
//...hate...hate...hate
//...bigger than I & a dragon's eye
//...grr...HATE
//include "el.wdl";
include <el.wdl>;

entity* e1;
/************************************
	initf
		initialize for 50 entity lists
		(sel lists here)
*************************************/
starter initf() {
	if (!elrNew(50)) {	// 50 lists
		error("elrNew failed");
	}
}
/************************************
	efSelPaint
		sel paint selected entities in _grp (sel group)
*************************************/
function efSelPaint(_grp) {
	elNextReset(_grp);
	e1 = elNext(_grp);
	while(e1 != NULL) {
		// draw sel bracket for entity e1
		e1 = elNext(_grp);
	}
}
/************************************
	efSelAdd
		add _e (entity) to _grp (sel group)
*************************************/
function efSelAdd(_grp, _e) {
	if (_e == 0) { return(0); }
	e1 = _e;
	/*e1 = ptr_for_handle(_e);
	if (e1 == NULL) { return(0); }
	*/
	return(elAdd(_grp, e1););
}
/************************************
	efSelRemove
		remove _e (entity) from _grp (sel group)
*************************************/
function efSelRemove(_grp, _e) {
	if (_e == 0) { return(0); }
	e1 = _e;
	/*e1 = ptr_for_handle(_e);
	if (e1 == NULL) { return(0); }
	*/
	return(elRemove(_grp, e1));
}

/*
	if (efSelRemove(grpRunners, eClicked)) {
		efSelPaint(grpRunners);
	}
*/


Re: Reselect Unit hell & el [Re: testDummy] #203415
04/21/08 22:36
04/21/08 22:36
Joined: May 2007
Posts: 185
Netherlands
SurudoiRyu Offline OP
Member
SurudoiRyu  Offline OP
Member

Joined: May 2007
Posts: 185
Netherlands
Hmm can you perhaps explain what you are doing with it ?
I don't get a thing of this script :S
Its a bit to elite for me lol :P

Thnx allready,


-The Dragon's Eye is alway's watching you!-
Re: Reselect Unit hell & el [Re: SurudoiRyu] #203788
04/24/08 07:46
04/24/08 07:46
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
nothing elite, you may disregard the code snippet if that feels appropriate:
It's just a theoretical example using a plug in:
-->entity lists (el) and arrays
'I' have a bad habit of mentioning it for some reason.

The binaries and sources are available here:
http://testdummy93.tripod.com/

grp = group
ef = entity function

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