|
Re: How do i pick up and carry a "box" and then set it down agian?
[Re: Pappenheimer]
#267880
05/26/09 16:47
05/26/09 16:47
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
How do I convert this to C-Lite?
DEFINE _full_hand flag8; //<----- A5 code
how do I write this in C_Lite code?
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do i pick up and carry a "box" and then set it down agian?
[Re: Pappenheimer]
#267939
05/26/09 23:01
05/26/09 23:01
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi! A long time ago I picked  up this code from the forum. Many thanks to the person who posted it....It's coming back.
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;
}
}
I used it alot and it worked for me Hope this helps  Ottawa
|
|
|
Re: How do i pick up and carry a "box" and then set it down agian?
[Re: Ottawa]
#268011
05/27/09 07:58
05/27/09 07:58
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
@Ottava: I have used similar code my self several times. And that works fine. But this kind of code uses the mouse to pick up and move the object. I whant to be able to us the player to do this. Because I dont whant to make the mouse pointer come out just to pick up something..... I whant the player to be able to go to the box pick it up with the hands carry it to the selected point and set it down. When that happends the player gets its reward..... 
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do i pick up and carry a "box" and then set it down agian?
[Re: Cowabanga]
#268012
05/27/09 07:59
05/27/09 07:59
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
How do I convert this to C-Lite?
DEFINE _full_hand flag8; //<----- A5 code Like this: #define _full_hand FLAG8; yes that was it, thanks!
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do i pick up and carry a "box" and then set it down agian?
[Re: Pappenheimer]
#268392
05/29/09 00:16
05/29/09 00:16
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi! Are all your models (boxes), that you want to pick up, the same? If so, you could add in MED a vertex in the middle, the number would probably be the same and then you could use vec_for_vertex. Ottawa 
|
|
|
Re: How do i pick up and carry a "box" and then set it down agian?
[Re: Ottawa]
#268433
05/29/09 08:28
05/29/09 08:28
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
Yes I will try to do that, and yes everyone is almost the same.
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do i pick up and carry a "box" and then set it down agian?
[Re: Eagelina]
#268436
05/29/09 08:36
05/29/09 08:36
|
Joined: Apr 2006
Posts: 624 DEEP 13
badapple
User
|
User
Joined: Apr 2006
Posts: 624
DEEP 13
|
in case you are still in need , i also have a working demo of this on my site but is old a6 my site its in the free wdl section
|
|
|
Re: How do i pick up and carry a "box" and then set it down agian?
[Re: badapple]
#268437
05/29/09 08:43
05/29/09 08:43
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
Yes I have downloaded it, and are planning on work with it later today. I whant it to be in Lite-C so I may need help converting it.....
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
|