Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Akow), 1,361 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problem mouse_ent #402026
05/28/12 21:37
05/28/12 21:37
Joined: Jun 2011
Posts: 75
algeria
T
Tonyjack221 Offline OP
Junior Member
Tonyjack221  Offline OP
Junior Member
T

Joined: Jun 2011
Posts: 75
algeria
this code for edit position of objects

Code:
ENTITY* xy;
ENTITY* selecto;
var select=0;
function Move_xy(ENTITY* moveme)
{
	selecto=me;
	
	while(1)
	{

		if((mouse_left == 1)&(select==1))
		{
			if(moveme==mouse_ent)
			{
				mouse_ent.x +=7*mouse_force.y;
				mouse_ent.y -=7*mouse_force.x;
//				vec_set(xy.x, mouse_ent.x);
//		      vec_set(xy.y, mouse_ent.y);
			}
		}
		wait(1);	
	}	
	
}
function Move_models(ENTITY* moi)
{
	xy=me;
	while(1)
	{
		if((mouse_left == 1)&(select==0))
		{
			if(moi==mouse_ent)
			{
				ent_create("xyz.mdl",vector(moi.x,moi.y,moi.z),Move_xy);
				select=1;
				return;
			}
		}

		if((mouse_left == 1)&(select==1))
		{
			if(moi==mouse_ent)
			{
				ent_remove(selecto);
				select=0;	
			}
		}
		wait(1);	
	}
}



i try to create like this :

the problem is wane i go to other object i can't return to the first object

Last edited by Tonyjack221; 05/29/12 12:22.
Re: problem mouse_ent [Re: Tonyjack221] #402051
05/29/12 12:03
05/29/12 12:03
Joined: Jun 2011
Posts: 75
algeria
T
Tonyjack221 Offline OP
Junior Member
Tonyjack221  Offline OP
Junior Member
T

Joined: Jun 2011
Posts: 75
algeria
??????????????

Re: problem mouse_ent [Re: Tonyjack221] #402052
05/29/12 12:10
05/29/12 12:10
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Actions shouldn't have parameters. Please format your code with the code tags when posting here.


Always learn from history, to be sure you make the same mistakes again...

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