Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 15,499 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
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 Offline OP
Senior Member
Eagelina  Offline 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. smile
Re: How do I manually program where the use_box is on the playe [Re: Eagelina] #276519
07/05/09 13:22
07/05/09 13:22
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany

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 Offline OP
Senior Member
Eagelina  Offline 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. smile
Re: How do I manually program where the use_box is on the playe [Re: Eagelina] #276532
07/05/09 14:50
07/05/09 14:50
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
I didn't have a look at the examples of this article.
For your purpose its enough to write a 'my.min_z = -70;' or what count of quants fit with your models feet.

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 Offline
Expert
EvilSOB  Offline
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 Offline OP
Senior Member
Eagelina  Offline 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. smile
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 Offline OP
Senior Member
Eagelina  Offline 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. smile
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 Offline
Expert
EvilSOB  Offline
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 Offline OP
Senior Member
Eagelina  Offline 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. smile
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 Offline
Expert
EvilSOB  Offline
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
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | 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