Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by jcl. 06/16/26 09:51
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Quad, VoroneTZ), 3,544 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
EDIT: cam question #206904
05/16/08 12:40
05/16/08 12:40
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Hi,

I've used 3D Gamestudio A7.07 and I've got a problem with a converted script from C-script to C-lite:

Code:
ENTITY* rood; //dutch for red
...
function roodlicht ()
{
	set(rood,LIGHT);
	rood.red = 255;
	if (rood.lightrange == 600)
	{
		rood.lightrange = 0;
	}
	else
	{
		rood.lightrange = 600;
	}
}

action rood_licht ()
{
	rood = me;
}


function key_presses ()
{
	on_t = roodlicht;
}


The idea is, when I press "T" the light become red, when I press "T" again, the light goes out. The action is attached to a model in the level wich load when the script start.

I hope you will help me smile

Last edited by n00bie; 05/22/08 10:35.
Re: What's wrong with this light? [Re: n00bie] #206948
05/16/08 18:26
05/16/08 18:26

M
mercuryus
Unregistered
mercuryus
Unregistered
M



Nothing wrong with it.
Check if you have assigned action rood_licht and called key_presses(); for shure.
Check also if the lightrange is huge enough...

Re: What's wrong with this light? [Re: ] #206978
05/16/08 20:19
05/16/08 20:19
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Originally Posted By: mercuryus
Nothing wrong with it.
Check if you have assigned action rood_licht and called key_presses(); for shure.
Check also if the lightrange is huge enough...


Lightrange is huge enough, i've assigned rood_licht but it still doesn't work.

Re: What's wrong with this light? [Re: n00bie] #207011
05/17/08 03:24
05/17/08 03:24
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
Try to put "on_t = roodlicht" to your function main
or call function key_presses() within a loop.

Re: What's wrong with this light? [Re: vlau] #207100
05/17/08 18:22
05/17/08 18:22
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
no need for calling it within a loop, but are you sure key_presses is called?

Re: What's wrong with this light? [Re: Joey] #207803
05/22/08 10:35
05/22/08 10:35
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
This lightproblem is solved right now. But now the next problem:

Code:
function cam1()
{
	camera.x = player.x -224;
	camera.y = player.y +0;
	camera.z = player.z +480;
	camera.pan = player.pan -300;
}
...
function key_presses_cams()
{
	on_f1 = cam1;
}


In the main function is "key_presses_cams" called. When I press F1 the engine shuts down with an error.


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