1 registered members (TipmyPip),
15,499
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
How do I manually program where the use_box is on the player?
#276505
07/05/09 12:43
07/05/09 12:43
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
I use this line in my code for the movement and gravity for my player.
if (c_trace(my.x,vector(my.x,my.y,my.z-5000),IGNORE_ME | IGNORE_PASSABLE | USE_BOX) > 0)
Question:
How do I manually program where the use_box will be on the player model. Because my model (selfmade) need to get his box adjusted... when I hit F11 the box is at the models knees , but I need it to be at the bottom of the models shoes.
So how manually write the code that are needed to say where the box is?
Last edited by Eagelina; 07/05/09 12:48.
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I manually program where the use_box is on the playe
[Re: Pappenheimer]
#276521
07/05/09 13:48
07/05/09 13:48
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
@pappenheimer Thanks I will look at that one, it may be what I am looking for.
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I manually program where the use_box is on the playe
[Re: Pappenheimer]
#276533
07/05/09 14:52
07/05/09 14:52
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Also look at c_setminmax(ENTITY*) This is a "self-sizing" for the box that MAY suit your needs.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: How do I manually program where the use_box is on the playe
[Re: Pappenheimer]
#276550
07/05/09 16:02
07/05/09 16:02
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
@pappenheimer
No that didnt do the trick either....
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I manually program where the use_box is on the playe
[Re: EvilSOB]
#276552
07/05/09 16:05
07/05/09 16:05
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
@EvilSOB I know about c_setminmax(ENTITY*), but that sets the box for al of the model. I only whant a smal box at the models feet (selfmade). Or I whant only to have a box around the head. If you get my drift.
I did see it somewhere how to do it but dont remember where....
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I manually program where the use_box is on the playe
[Re: Eagelina]
#276555
07/05/09 16:09
07/05/09 16:09
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Ah, you want to manually set the entity.min_x,min_y,min_z and entity.max_x,max_y,max_z values. they are the 'corners' of the bounding box.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: How do I manually program where the use_box is on the playe
[Re: EvilSOB]
#276557
07/05/09 16:15
07/05/09 16:15
|
Joined: Mar 2006
Posts: 321 Norway
Eagelina
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2006
Posts: 321
Norway
|
yes, but sorry for asking..... where in the players code shall I put this? Or shall I put this in the main?
A6 and A7 Commercial ------------------- Programmer always searching for more to learn and understand.
|
|
|
Re: How do I manually program where the use_box is on the playe
[Re: Eagelina]
#276565
07/05/09 17:00
07/05/09 17:00
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Just at the start of the players action, before any loops start. It only needs setting once.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|