Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, Ayumi), 702 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
BEAM / STREAK #332346
07/09/10 01:53
07/09/10 01:53
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
First, I have never had this problem before.

I am trying to make a particle line between two vectors. Beam and streak do not work, no particle is visible on the screen. The code is straight out of the manual for BEAM / STREAK. I am not using the ISOMETRIC flag for the camera.


Making dreams come true... And being erroneously accused of software piracy by Conitec in the process.
Re: BEAM / STREAK [Re: draculaFactory] #332347
07/09/10 02:22
07/09/10 02:22
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
What version are you using? laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: BEAM / STREAK [Re: 3run] #332358
07/09/10 07:58
07/09/10 07:58
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
A7 Comm grin


Making dreams come true... And being erroneously accused of software piracy by Conitec in the process.
Re: BEAM / STREAK [Re: draculaFactory] #332382
07/09/10 12:22
07/09/10 12:22
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Then post your code, please.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: BEAM / STREAK [Re: Superku] #332460
07/09/10 20:06
07/09/10 20:06
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
Quote:
The code is straight out of the manual for BEAM / STREAK.



Making dreams come true... And being erroneously accused of software piracy by Conitec in the process.
Re: BEAM / STREAK [Re: draculaFactory] #332461
07/09/10 20:17
07/09/10 20:17
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
...
Are you using lite-C or c-script?
The code in the german manual under BEAM/ STREAK is the following:

Code:
// Hilfsfunktion: setzt den Vektor auf Zufallsrichtung und -Länge
function vec_randomize(&vec,range)
{
  vec[0] = random(1) - 0.5;
  vec[1] = random(1) - 0.5;
  vec[2] = random(1) - 0.5;
  vec_normalize(vec,random(range));
} 		

// Hilfsfunktion: blendet einen Partikel aus
function part_alphafade()
{
  my.alpha -= time+time;
  if (my.alpha <= 0) { my.lifespan = 0; } // Alpha <= 0, dann Partikel vernichten
}

//Partikelfunktion: generiert eine verblassende Explosion in Richtung vel 
function effect_explo()
{
  vec_randomize(temp,10);
  vec_add(my.vel_x,temp);
  my.alpha = 25 + random(25);
  my.bmap = scatter_map;
  my.flare = on;
  my.bright = on;
  my.beam = on; //Partikel verschmieren
  my.move = on;
  my.function = part_alphafade; // ändere in eine kürzere, schnellerer Funktion
}
...
vec_scale(normal,10); // produziere eine Explosion in Richtung der Normalen
effect(effect_explo,1000,my.x,normal);



This one?


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: BEAM / STREAK [Re: Superku] #332464
07/09/10 20:57
07/09/10 20:57
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
Lite-c, and yes that is the code, its the same. I didn't realize that you thought there may be a difference between the German manual and the English manual, but that is the code. It simply does not work, but as I've said, I have never had this problem before. BEAM and STREAK have always worked without error before.


Making dreams come true... And being erroneously accused of software piracy by Conitec in the process.
Re: BEAM / STREAK [Re: draculaFactory] #332465
07/09/10 21:02
07/09/10 21:02
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Yes, then there is the problem, the manual code is C-Script code. A lite-C particle effect should look somehow like the following code:

Code:
function eff_somerandomeffect(PARTICLE* p) {
	vec_add(p.x,vector(random(4)-2,0,random(4)-2));
	vec_add(p.vel_x,vector(random(2)-1,0,random(2)-1));
	set(p, MOVE | BRIGHT | BEAM);
	p.bmap = bmp_flame_circle32;
	p.alpha = 60+random(40);
	p.size = 16+random(4);
	p.event = eff_fadefunction;
}



Last edited by Superku; 07/09/10 21:03.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: BEAM / STREAK [Re: Superku] #332475
07/09/10 22:37
07/09/10 22:37
Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
draculaFactory Offline OP
User
draculaFactory  Offline OP
User

Joined: Feb 2005
Posts: 647
Williamsburg, VA USA
Here's the thing: I tried it with my own code as well and it does not work either. I tried it with code from other projects of mine (code that I know works) and it still doesn't work. Yes that is c-script and no the answer is not that simple. I added BEAM and STREAK to other particles within the same project and they disappeared.

Code:
function p_alphafade(PARTICLE *p)
{
    p.alpha -= p.skill_a*time_step;
    if (p.alpha <= 0) p.lifespan = 0;
}

function p_trace(PARTICLE *p)
{
   set(p, BRIGHT|TRANSLUCENT|BEAM);
   p.size = 2;
   p.skill_a = 1; // fade factor
   p.event = p_alphafade;
}

// entity that runs in circles and leaves a vapor trail
action tracer()
{
   var dist = 0,radius = 10,sign = 1;
   VECTOR last_pos;
   while(1) 
   {
      vec_set(last_pos,my.x);
      dist += 30*time_step;
      radius += sign*random(3)*time_step; // change radius randomly
      if (radius > 150) sign = -1;
      else if (radius < 30) sign = 1;
      my.x = radius*sin(dist);
      my.y = radius*cos(dist);
      effect(p_trace,1,my.x,vec_sub(last_pos,my.x));
      wait(1);
   }
}

function main()
{
  vec_set(sky_color,vector(50,1,1)); // dark blue
  level_load(NULL);
  video_window(NULL,NULL,0,"Vapor trail demo");
  vec_set(camera.x,vector(-250,0,50));
  vec_set(camera.pan,vector(0,-15,0));

  ent_create(NULL,vector(0,0,0),tracer);  
}



This is from the manual, it does not work. Unless someone has an actual suggestion as to how to get BEAM and STREAK working, please don't waste my time asking the same basic questions that everyone knows about. It seems as of late, I have had nothing but problems with the engine. I have viewed other threads about similar situations and they usually end with no resolution grin


Making dreams come true... And being erroneously accused of software piracy by Conitec in the process.
Re: BEAM / STREAK [Re: draculaFactory] #332478
07/09/10 22:56
07/09/10 22:56
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Install the latest DirectX drivers (9.29) and give it a try.

EDIT:
"please don't waste my time asking the same basic questions that everyone knows about"

What do you mean by saying this, that I waste your time?!

Last edited by Superku; 07/09/10 23:00.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 1 of 2 1 2

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