Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 10:32
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 604 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Moving Camera Script #123965
04/14/07 12:36
04/14/07 12:36
Joined: Apr 2007
Posts: 6
L
Lord_Kain Offline OP
Newbie
Lord_Kain  Offline OP
Newbie
L

Joined: Apr 2007
Posts: 6
When I want to convert a simple demo into an exe file, it can't publish unless I choose a script. Yet every script I choose kills the mouse and keyboard movement. I do not want to introduce an entity in the presentation just to fly arround. How do I achieve this?

Re: Moving Camera Script [Re: Lord_Kain] #123966
04/14/07 15:45
04/14/07 15:45
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline
Expert
Error014  Offline
Expert

Joined: Jul 2002
Posts: 3,208
Germany
I'm sure, one day someone will ask me how to improve the world. I'll look at him, smile and say, well, it's easy, one would just have to USE THE SEARCHFUNCTION. I'd then become really angry and probably wouldn't be able to control myself anymore, only to wake up in the middle of lots of lots of blood.

Oh, yeah, heres your script.

Code:

function main() {
//Load the level
level_load("Whateveritsnameis"); //i.e. "mylevel.wmb"
//now, cam!
WHILE(1) {
temp.x = (key_w-key_s+key_cuu-key_cud)*15*time_step;
temp.y = (key_d-key_a)*15*time_step; //"strafing"
temp.z = 0; //no gravity
camera.pan -= (mouse_force.x+key_cur-key_cul)*15*time_Step;
camera.tilt += mouse_force.y*15*time_Step;
vec_rotate(temp,camera.pan);
vec_add(camera.x,temp);
wait(1);
}
}



To add collision, trace between the cameraposition (i.e. camera.x) and the target position (temp.x+camera.x-> vec_add(temp,camera.x)). Thats it, I guess.

Maybe I mixed up + and - somewhere. Or maybe somewhere the key is wrong. To make it move/rotate slower/faster, change the 15 to a smaller/higher number.
I haven't had much time to script lately, so maybe there are typos and what-have-you. Let me know if it works.


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: Moving Camera Script [Re: Error014] #123967
04/14/07 16:06
04/14/07 16:06
Joined: Apr 2007
Posts: 6
L
Lord_Kain Offline OP
Newbie
Lord_Kain  Offline OP
Newbie
L

Joined: Apr 2007
Posts: 6
Hmm ... parametr unknown, time_step. Both of them ...

Re: Moving Camera Script [Re: Lord_Kain] #123968
04/14/07 16:47
04/14/07 16:47

A
Anonymous
Unregistered
Anonymous
Unregistered
A



what version do you have

Re: Moving Camera Script [Re: ] #123969
04/14/07 19:29
04/14/07 19:29
Joined: Apr 2007
Posts: 6
L
Lord_Kain Offline OP
Newbie
Lord_Kain  Offline OP
Newbie
L

Joined: Apr 2007
Posts: 6
I have version 6.22.
Thanks in advance!

Re: Moving Camera Script [Re: Lord_Kain] #123970
04/14/07 21:45
04/14/07 21:45
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline
Expert
Error014  Offline
Expert

Joined: Jul 2002
Posts: 3,208
Germany
Replace "time_step" with "time".

Back in the old days, we called it "time", but that was so 2006!


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: Moving Camera Script [Re: Error014] #123971
04/14/07 22:05
04/14/07 22:05
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Back in the old days we called it WAREZ... lol.


xXxGuitar511
- Programmer
Re: Moving Camera Script [Re: xXxGuitar511] #123972
04/15/07 07:24
04/15/07 07:24
Joined: Apr 2007
Posts: 6
L
Lord_Kain Offline OP
Newbie
Lord_Kain  Offline OP
Newbie
L

Joined: Apr 2007
Posts: 6
Whats a WAREZ?

Re: Moving Camera Script [Re: Lord_Kain] #123973
04/15/07 07:37
04/15/07 07:37
Joined: Apr 2005
Posts: 3,076
Germany, NRW
rvL_eXile Offline

3D Artist
rvL_eXile  Offline

3D Artist

Joined: Apr 2005
Posts: 3,076
Germany, NRW
LOL ... Warez means, illegal Software, i think nobody helps u , coz ure warez Verson of GS...

cYa Sebastian


Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE


Re: Moving Camera Script [Re: rvL_eXile] #123974
04/15/07 10:45
04/15/07 10:45
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I don't even really care that it is warez, it's just that the warez version DOES NOT WORK. Everyone with the warez version comes here and asks why it's not working...


xXxGuitar511
- Programmer
Page 1 of 2 1 2

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