Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (ozgur, Ayumi, VHX, monarch), 1,161 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How do I create lights using Lite-C script ? #412869
12/04/12 15:22
12/04/12 15:22
Joined: Mar 2012
Posts: 43
J
Juggernaut Offline OP
Newbie
Juggernaut  Offline OP
Newbie
J

Joined: Mar 2012
Posts: 43
Hello,

The manual shows how to create static lights in WED.

But how do I create - point and spot lights using Lite-C script at runtime ? Can I create 200 spot and point lights using Lite-C
script at run time ? Or am I limited to 8 lights as in the fixed function pipeline ?

How can I create and alter properties of Ambient Light at run time ?

How can I create Directional light using Lite-C script ?

Thanks,

Re: How do I create lights using Lite-C script ? [Re: Juggernaut] #412870
12/04/12 15:24
12/04/12 15:24
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
This will answer all your questions:

http://www.conitec.net/beta/aentity-lightrange.htm


Always learn from history, to be sure you make the same mistakes again...
Re: How do I create lights using Lite-C script ? [Re: Uhrwerk] #412871
12/04/12 15:53
12/04/12 15:53
Joined: Mar 2012
Posts: 43
J
Juggernaut Offline OP
Newbie
Juggernaut  Offline OP
Newbie
J

Joined: Mar 2012
Posts: 43
Ok. The 8 lights limitation is there.

But how do I create Spot, Point and Directional Light using scripts at run-time ?

Is there any example showing creation of each of them ?

Re: How do I create lights using Lite-C script ? [Re: Juggernaut] #412876
12/04/12 16:42
12/04/12 16:42
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,107
Germany
If u follow Uhrwerks link you should have a huge amount of infos fex

Create spotlight at runtime
Code:
action rotating_spot()
{
  my.lightrange = 1000; 
  set(my,SPOTLIGHT);
  while(1) {
    my.pan += 2*time_step;
    wait(1);
  }
}



Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: How do I create lights using Lite-C script ? [Re: rayp] #412877
12/04/12 16:53
12/04/12 16:53
Joined: Mar 2012
Posts: 43
J
Juggernaut Offline OP
Newbie
Juggernaut  Offline OP
Newbie
J

Joined: Mar 2012
Posts: 43
ok thank you guys.

Re: How do I create lights using Lite-C script ? [Re: Juggernaut] #412908
12/04/12 22:54
12/04/12 22:54
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Please note that the 8 lights limitation applies to a single entity, block, or terrain chunk. The actual number of lights visible at one time is virtually unlimited.


Always learn from history, to be sure you make the same mistakes again...
Re: How do I create lights using Lite-C script ? [Re: Uhrwerk] #412936
12/05/12 11:01
12/05/12 11:01
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Thanks Uhrwerk, that's an important info!


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