2 registered members (AbrahamR, 1 invisible),
858
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
[req] simple traffic light w/ red,yellow,green animation
#357010
02/05/11 07:33
02/05/11 07:33
|
Joined: Aug 2008
Posts: 81
jpxtreme
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2008
Posts: 81
|
I already have some traffic light models but they don't have animations. I cannot figured out how to animate the model to make the color change. I'm really a noob in model making in MED. If someone is kind enough to share or better yet animate this model. Just 3 frames of animation is enough. The frame 1 is for red and then next is yellow then green. Then I really be thankful because It's a big help for my simple car game. here's the link... traffic_light.MDLHoping for someone to lend a hand. Thanks!
|
|
|
Re: [req] simple traffic light w/ red,yellow,green animation
[Re: jpxtreme]
#357031
02/05/11 09:41
02/05/11 09:41
|
Joined: Sep 2003
Posts: 303 Germany
Clemens
Senior Member
|
Senior Member
Joined: Sep 2003
Posts: 303
Germany
|
Did you already try to realize that effect with a dynamic light, switching its position and changing its color?
Edit: Oh and by the way: a look inside the model shows me that it has a lot of polygons related to its extreme low poly look.
Last edited by Clemens; 02/05/11 09:44.
|
|
|
Re: [req] simple traffic light w/ red,yellow,green animation
[Re: Blattsalat]
#357145
02/05/11 20:14
02/05/11 20:14
|
Joined: Apr 2005
Posts: 653 Germany
Det
User
|
User
Joined: Apr 2005
Posts: 653
Germany
|
Hello !
If you need a code for a Trafficlight I have it but it`s not Lite C it`s C Script that works with a Traffic Light Model but you must to modify the C Script Code in to a Lite C Code Let me know if you want the code .
Wissen ist macht. Nichts wissen macht auch nichts.
A7.86
|
|
|
Re: [req] simple traffic light w/ red,yellow,green animation
[Re: jpxtreme]
#357344
02/06/11 19:27
02/06/11 19:27
|
Joined: Apr 2005
Posts: 653 Germany
Det
User
|
User
Joined: Apr 2005
Posts: 653
Germany
|
Hi jpextreme ! Ok here is the Code in C Scipt for your Trafficlight :
var ampelvar = 1;
function ampel_event()
{
while (ampelvar == 1) // wenn Ampel an
{
my.skin = 1; //grüner Skin green skin
my.lightrange = 1000; //Reichweite des Lichts range of light
my.red = 0;
my.green = 255;
my.blue = 0;//grünes Licht green light
waitt (960); //warte 60 sek
my.skin = 2; //gelber Skin
my.lightrange = 1000; //Reichweite des Lichts range of light
my.red = 255;
my.green = 255;
my.blue = 0; //gelbes Licht yellow ligt
waitt (32); //warte 2 sek
my.skin = 3; //roter Skin red skin
my.lightrange = 1000; //Reichweite des Lichts range of light
my.red = 255;
my.green =0;
my.blue = 0; //rotes Lcht red light
waitt (240); //warte 15 sek wait 15 seconds
my.skin = 2; //gelber Skin yellow skin
my.lightrange = 1000; //reichweite des Lichts
my.red = 255;
my.green = 255;
my.blue = 0; //gelbes Licht yellow light
waitt (32); //warte 2 sek wait 2 seconds
}
}
action ampel // Tis is the Trafficlight Action
{
my.event = ampel_event();
}
I wrote some Comments for you in English so you can understand it better .
Last edited by Det; 02/06/11 19:30.
Wissen ist macht. Nichts wissen macht auch nichts.
A7.86
|
|
|
Re: [req] simple traffic light w/ red,yellow,green animation
[Re: xxxxxxx]
#357362
02/06/11 19:57
02/06/11 19:57
|
Joined: Apr 2005
Posts: 653 Germany
Det
User
|
User
Joined: Apr 2005
Posts: 653
Germany
|
Ich weiß nicht was Du hat der Code läuft 1A zumindest in der A5 lief der Code so wie er da steht das kann man so lassen . Man kann es schon ändern aber ist nicht nötig.
Mußte ihnm in Englisch Antworten
Last edited by Det; 02/06/11 20:00.
Wissen ist macht. Nichts wissen macht auch nichts.
A7.86
|
|
|
Re: [req] simple traffic light w/ red,yellow,green animation
[Re: xxxxxxx]
#357372
02/06/11 20:19
02/06/11 20:19
|
Joined: Apr 2005
Posts: 653 Germany
Det
User
|
User
Joined: Apr 2005
Posts: 653
Germany
|
Nein benutzt er nicht ich vermute A7 oder A8 aber ich hab ihm schon gesagt das er den Code in Lite C Kovertieren muß damit er bei ihm läuft. Und das die Befehle sich gegenüber C Script geändert haben ist ja klar. Lite C soll ja einfacher sein als C Script.Müssen wir eben alle Lite C nehmen in Zukunft .
Wissen ist macht. Nichts wissen macht auch nichts.
A7.86
|
|
|
|