Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Ayumi, AndrewAMD, Quad), 1,014 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Slow Motion Camera #203135
04/19/08 18:38
04/19/08 18:38
Joined: Apr 2008
Posts: 3
4
461 Offline OP
Guest
461  Offline OP
Guest
4

Joined: Apr 2008
Posts: 3
Does anyone have a slow motion script for camera? Like the slow motion in F.E.A.R
or matrix (?)

Thanks,

Virtuamark

Re: Slow Motion Camera [Re: 461] #203136
04/19/08 18:42
04/19/08 18:42
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
time_factor = 0.2;


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: Slow Motion Camera [Re: Michael_Schwarz] #203141
04/19/08 19:14
04/19/08 19:14
Joined: Apr 2008
Posts: 3
4
461 Offline OP
Guest
461  Offline OP
Guest
4

Joined: Apr 2008
Posts: 3
Thanks for your reply. But where do i have to type this? Camera.wdl ? Give me a tip, please. I am a newbie. THKS.

virtuamark

Re: Slow Motion Camera [Re: 461] #203143
04/19/08 19:48
04/19/08 19:48

M
Malice
Unregistered
Malice
Unregistered
M



that depends on if you always want slow mo or if you want it triggered

Re: Slow Motion Camera [Re: 461] #203203
04/20/08 12:15
04/20/08 12:15
Joined: Oct 2007
Posts: 116
S
sydan Offline
Member
sydan  Offline
Member
S

Joined: Oct 2007
Posts: 116
I havent't seen the slow motion in F.E.A.R but if you want the slow motion to be triggered by a key press (an held, Im not going through toggle) then you will need code that looks like this probably placed in your player action:

 Code:
if(key_z == 1) //this checks to see if the z key is pressed, any key can be used
{
   time_factor = 0.2;
}
else
{
   if(key_z == 0)
   {
      time_factor = 1;
   }
}


For this you will have to put *time after all your speed changes. By this I mean

ent_move(vector(my.speed_x*time,0,0),nullvector)

the *time ensures that all speeds are changed by time.

Sydan


For some reason, my ambition always seems to beat my ability.
Re: Slow Motion Camera [Re: sydan] #203784
04/24/08 03:54
04/24/08 03:54
Joined: Apr 2008
Posts: 3
4
461 Offline OP
Guest
461  Offline OP
Guest
4

Joined: Apr 2008
Posts: 3
The firs part of the code work, but need some changes.
The part I don't get it is the one you wrote down as follow:

ent_move(vector(my.speed_x*time,0,0),nullvector)

Where do I have to type this. Also in player action o where?

Thanks

virtuamark

Re: Slow Motion Camera [Re: 461] #203826
04/24/08 12:03
04/24/08 12:03
Joined: Oct 2007
Posts: 116
S
sydan Offline
Member
sydan  Offline
Member
S

Joined: Oct 2007
Posts: 116
Sorry I didn't explain this very well. When making a game the speed at which the computer runs (called the fps rate) will change (you probably already know this) when it does the game will slow down or speed up as the computer does. To stop this from happening you have to multiply all the speeds in your game by a value called time or time_step this stops the game from slowing down or speeding up with the computer. If you multiply your speeds by time then you can change time with time_factor. However ONLY values multiplied by time will be affected so the slow motion will only work for those. ent_move... is simply a movement function. In something like this you need the time factor so that the speed of an object is effected by time. Ent_move may also appear as c_move.

Also if your using templates then they should already have time in the correct places. If they don't its a tricky process of putting it in.

I hope that was a bit better (probably not though knowing my capability to explain)

Thanks Sydan


For some reason, my ambition always seems to beat my ability.
Re: Slow Motion Camera [Re: sydan] #203998
04/25/08 15:44
04/25/08 15:44
Joined: Jan 2006
Posts: 59
Desert Zone
WolfCoder Offline
Junior Member
WolfCoder  Offline
Junior Member

Joined: Jan 2006
Posts: 59
Desert Zone
 Originally Posted By: sydan
I havent't seen the slow motion in F.E.A.R but if you want the slow motion to be triggered by a key press (an held, Im not going through toggle) then you will need code that looks like this probably placed in your player action:

 Code:
if(key_z == 1) //this checks to see if the z key is pressed, any key can be used
{
   time_factor = 0.2;
}
else
{
   if(key_z == 0)
   {
      time_factor = 1;
   }
}


For this you will have to put *time after all your speed changes. By this I mean

ent_move(vector(my.speed_x*time,0,0),nullvector)

the *time ensures that all speeds are changed by time.

Sydan


You don't need the if(key_z == 0) if you use an else, if the key isn't being pressed already, then it is not being pressed and that if statement at the end isn't needed.

Re: Slow Motion Camera [Re: WolfCoder] #204081
04/26/08 10:48
04/26/08 10:48
Joined: Oct 2007
Posts: 116
S
sydan Offline
Member
sydan  Offline
Member
S

Joined: Oct 2007
Posts: 116
Thanks! Yeah now I think about it properly it is useless.


For some reason, my ambition always seems to beat my ability.

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