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
3 registered members (AndrewAMD, TipmyPip, OptimusPrime), 15,359 guests, and 7 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
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