Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Moving by dragging mouse? [Re: Ottawa] #229170
09/24/08 23:51
09/24/08 23:51
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
well both say undefined var, but surely temp doesn't need to be defined.


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Moving by dragging mouse? [Re: Blade280891] #229475
09/27/08 20:12
09/27/08 20:12
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
Trying this, but the person (model, with action assigned) isn't moving at all

Code:
#include <acknex.h> // include these predefined, needed files in our project
#include <default.c>

ENTITY*box;
function force_power();
function pick_drop();
action forcebox();
var i_counter = 0; // or integer
VECTOR* temp_m = {x=0;y=0;z=0;}

function main()
{
	level_load("force_test.wmb");
	wait(1);
	mouse_mode = 4;
	while(1)
	{
		mouse_pos.x = mouse_cursor.x;
	  	mouse_pos.y = mouse_cursor.y;
		wait(1);
	}
}

function pick_drop ()
{
	wait (1);
	i_counter += 1;
	if ((i_counter % 2) == 1)
	{
		while (mouse_left == 1) //the object is selected with the mouse
		{
			vec_set (temp_m, vector(mouse_cursor.x,mouse_cursor.y,194)); // play with the z position
			vec_for_screen(temp_m, camera);
			vec_set (my.x,temp_m.x); // entity and camera are the same
			wait (1);
		}
	}
	vec_set (temp_m.x, my.x);
	my.z += 10; // (20)
	
	c_move(my,nullvector,nullvector, IGNORE_MAPS| ACTIVATE_TRIGGER | IGNORE_CONTENT | USE_AABB);
	
	if (event_type != EVENT_TRIGGER)
	{
		my.z -= 10; //
		i_counter += 1;
	}
}
/*
function force_power()
{
	if (event_type == EVENT_TOUCH)
 	{
		my.ambient = 100; // the make it look bright
	  	my.lightrange = 200; // and generate light on a radius of 200 quants!
	}
	else if(event_type == EVENT_RELEASE)
	{
		my.ambient = 0;
   	my.lightrange = 0;
	}
	if(event_type == EVENT_CLICK)
	{
		while(1)
		{
			if(mouse_left)
			{
				box.z = mouse_pos.z;
				box.x = mouse_cursor.x;
				box.y = mouse_cursor.y;
			//	camera.x = mouse_pos.x;	
			}
		}
	}
}
*/
action forcebox()
{
/*	box = me;
	my.emask |= ENABLE_TOUCH | ENABLE_RELEASE | ENABLE_CLICK;
   // run function highlight_event the wizards are touched or released
   my.event = force_power; 
   */
   if(mouse_left == 1)
   {
		pick_drop();
	}
}



My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Moving by dragging mouse? [Re: Ottawa] #229736
09/29/08 22:46
09/29/08 22:46
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi Blade

Is it working?

Ottawa smile

Re: Moving by dragging mouse? [Re: Ottawa] #229793
09/30/08 13:41
09/30/08 13:41
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
No, unfortunatly, no movement at all, i am wondering could this be due to my update to A7.5, as i cant see the model unless i am right next to it.


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: Moving by dragging mouse? [Re: Blade280891] #229955
10/01/08 20:33
10/01/08 20:33
Joined: Oct 2006
Posts: 106
i_program_games Offline
Member
i_program_games  Offline
Member

Joined: Oct 2006
Posts: 106
I've got some code which allows someone to move 3d objects in lite-c. I'll upload once I get home.


Chaos is a paradox consistently inconsistent.
Re: Moving by dragging mouse? [Re: i_program_games] #229958
10/01/08 20:47
10/01/08 20:47
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline OP
Serious User
Blade280891  Offline OP
Serious User

Joined: Jan 2008
Posts: 1,580
Ok, cool thanks games laugh


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
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