Gamestudio Links
Zorro Links
Newest Posts
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
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Setting a model to always be on the camera #295119
10/23/09 01:01
10/23/09 01:01
Joined: Jan 2007
Posts: 25
California, USA
D
darksmaster923 Offline OP
Newbie
darksmaster923  Offline OP
Newbie
D

Joined: Jan 2007
Posts: 25
California, USA
How would I set up a model to be one of those fps weapons?


I'm pretty awesome
Re: Setting a model to always be on the camera [Re: darksmaster923] #295121
10/23/09 01:11
10/23/09 01:11
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Make it a screen entity. From the manual (search for type):

ENTITY* shotgun_onscreen =
{

x = 100; // 100 quants in front of camera
y = -20; // to the right
z = -20; // below

type = "shotgun.mdl";
flags = SHOW;// visible on screen from the start
view = camera; // same camera parameters as the default view
}

It does not react on level lightning, though.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Setting a model to always be on the camera [Re: Superku] #295125
10/23/09 01:24
10/23/09 01:24
Joined: Jan 2007
Posts: 25
California, USA
D
darksmaster923 Offline OP
Newbie
darksmaster923  Offline OP
Newbie
D

Joined: Jan 2007
Posts: 25
California, USA
Is there any way to make it a little more dynamic? It is sitting on the screen, but I want it to rotate a little slowly compared to the player to make it seen like the player is actually holding something


I'm pretty awesome
Re: Setting a model to always be on the camera [Re: darksmaster923] #295128
10/23/09 01:50
10/23/09 01:50
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
... You did not do too much in 14 minutes to try it yourself but here we go:

function smooth_weapon_startup() {
while(1) {
shotgun_onscreen.pan += (mouse_force.x-shotgun_onscreen.pan/10)*time_step;
shotgun_onscreen.pan = clamp(shotgun_onscreen.pan,-5,5);
wait(1);
}
}

Not tested.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Setting a model to always be on the camera [Re: Superku] #295244
10/23/09 20:41
10/23/09 20:41
Joined: Jan 2007
Posts: 25
California, USA
D
darksmaster923 Offline OP
Newbie
darksmaster923  Offline OP
Newbie
D

Joined: Jan 2007
Posts: 25
California, USA
Well thanks, it works


I'm pretty awesome

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