Gamestudio Links
Zorro Links
Newest Posts
How to Change Multiplier
by vicknick. 06/02/23 03:27
How to buy tomorrow at open?
by vicknick. 06/02/23 03:19
Adding Position to Current Trade
by vicknick. 06/02/23 03:09
Unable to change multiplier of contract
by vicknick. 05/30/23 06:56
Wrong Definition of Sharpe Ratio in Zorro?
by vicknick. 05/29/23 06:32
Backtest strategy on bitcoin/crypto
by JamesHH. 05/26/23 04:36
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (vicknick, 7th_zorro, Quad), 1,030 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
BInnacle, androsa, XquicksnowX, danishinvest, Trail
18942 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
particle following an Entity, how?(+beam streak problem) #335293
07/27/10 17:26
07/27/10 17:26
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Hi,
Iam trying to get a particle following an entity.
The entity move just in one direction until it collides with something.

So what i thought, just giving the particle the same speed and direction, but it seems that particles move slower than entitys.

Cause when i add 5 quants to an entity x position, and set vel_x of the particle 5, it moves a lot slower than the ent.

Someone a tip?

Greets
Rackscha

Last edited by Rackscha; 07/28/10 11:19.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: particle following an Entity, how? [Re: Rackscha] #335295
07/27/10 17:31
07/27/10 17:31
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Try setting vel_x to 16*5=80.
If that doesn't work you can still set the particle's position directly.

Re: particle following an Entity, how? [Re: Lukas] #335296
07/27/10 17:40
07/27/10 17:40
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
thanks,
and someone know why using BEAM or STREAK causes the particle to disappear?


i use

Code:
set(p,MOVE|BEAM);



or are those Flags not stored in flags?
Where is an overview where all the flags are store din?(flags,flags2,emask...)

Greets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: particle following an Entity, how? [Re: Rackscha] #335350
07/27/10 22:06
07/27/10 22:06
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
There's a doc called "Flags at a glance" I think the name of it is floating around in the forums somewhere, Or it maybe on the AUM resource site.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: particle following an Entity, how? [Re: Nidhogg] #335354
07/27/10 22:29
07/27/10 22:29
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Cant find the Aum resource page.
JUst the gstusio page with all available Aums, but i dont want to go thorgh all aums since 67 to find out where it is.

Someone can help me?
(or do a simple example with beam and streak with compiled and source code to compare?)


GReets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: particle following an Entity, how? [Re: Rackscha] #335370
07/28/10 00:46
07/28/10 00:46
Joined: Jul 2010
Posts: 129
B
bk9iq Offline
Member
bk9iq  Offline
Member
B

Joined: Jul 2010
Posts: 129
From AUM 78::

Quote:
Q: Does anyone know how to put a fire particle effect behind the tail of a jet?

A: There you go.



BMAP* fire_tga = "fire.tga";



function fade_fire(PARTICLE *p)

{

p.alpha -= 4 * time_step; // fade out the fire particles

if (p.alpha < 0)

p.lifespan = 0;

}



function fire_effect(PARTICLE *p)

{

p->vel_x = 1 - random(2);

p->vel_y = 1 - random(2);

p->vel_z = 1 + random(1);

p.alpha = 25 + random(50);

p.bmap = fire_tga;

p.size = 25; // gives the size of the fire particles

p.flags |= (BRIGHT | MOVE);

p.event = fade_fire;

}



action my_jet() // attach this action to your plane

{

VECTOR jet_offset;

// put your own code here

// ........................

while (1)

{

// put your own jet flight code here

// the example below simply makes the plane fly in a circle

c_move (my, vector(20 * time_step, 0, 0), nullvector, IGNORE_PASSABLE | GLIDE);

my.pan += 2 * time_step; // 2 sets the radius of the circle

// end of the simply flying example code



// the jet particle effect code starts below

// place the particle jet at the proper position, play with these values

vec_set(jet_offset.x, vector(-100, -10, -20));

vec_rotate(jet_offset.x, my.pan);

vec_add(jet_offset.x, my.x);

effect(fire_effect, 5, jet_offset.x, nullvector); // generate 5 fire particles each frame

wait (1);

}

}


Hope this is what u want

Last edited by bk9iq; 07/28/10 00:47.
Re: particle following an Entity, how? [Re: Rackscha] #335375
07/28/10 02:18
07/28/10 02:18
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Originally Posted By: Rackscha
Cant find the Aum resource page.
JUst the gstusio page with all available Aums, but i dont want to go thorgh all aums since 67 to find out where it is.


Here is the link Flags at a glance 6/2009


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: particle following an Entity, how? [Re: Nidhogg] #335401
07/28/10 09:54
07/28/10 09:54
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
from an old script
Code:
void laser_alphafade(PARTICLE *prt){
  prt.alpha -= prt.skill_a*time_step;
  if(prt.alpha <= 0){ prt.lifespan = 0; }
}

void laser_trace(PARTICLE *prt){
  set(prt, BEAM | BRIGHT | TRANSLUCENT);
  prt.size = 32;
  prt.skill_a = 2; // fade factor
  vec_set(prt.blue, vector(0, 0, 255));
  prt.event = laser_alphafade;
}


action act_name(){
  ...
  while(me){

    vec_set(vec_temp, my.x); //save prev position
    c_move(me, vector(5,0,0), nullvector, NULL); //move the entity as required
    effect(laser_trace, 1, my.x, vec_sub(vec_temp, my.x));
    wait(1);
  }
}

hope this helps

Re: particle following an Entity, how? [Re: MrGuest] #335408
07/28/10 11:11
07/28/10 11:11
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
@bk9iq:
Ifyou have read the aum code, you should see that there is no BEAM or STREAK.

@Nidhogg: THanks, hope flags havent moved^^


@MrGuest:
Thanks i'll try that.


Greets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: particle following an Entity, how? [Re: Rackscha] #335409
07/28/10 11:22
07/28/10 11:22
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Sorry for doublepost, but it seems very strange here.
When i remove the picture from my particle and use a standart colored square, BEAM works without problems.

As soon as i try to use my picture, Particles disappear.
Is there something special i have to know about using pictures for particles?

I tried using the same picture as 64x64 png and 64x64 24bit bmp, nothing helped.


Someone an idea or testpicture he can give me?

Greets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

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