Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 509 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Any way to move a sprite placed with ent_decal ? #437087
02/09/14 05:57
02/09/14 05:57
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
Hi.

Is there any way to move a sprite which was placed via ent_decal ?
Code:
PARTICLE* p = ent_decal(you,bmMark,7+random(3),random(360)); // place a random sized decal at the hit entity 
            p.lifespan = 1600;   // remove decal after 100 seconds
            p.material = mat_model; // assign a dedal material


Using vel_z or p.z in an event does not work ( only with alpha-value to fade out ).
I tryed to use ent_create, but as guessed before, useless...need a decal to fit the surface ( like stain, blood etc ).

So...any way to move a already placed decal-sprite ?
Thanx2all


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: Any way to move a sprite placed with ent_decal ? [Re: rayp] #437090
02/09/14 07:14
02/09/14 07:14
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
isn't there a flag needed for moving patricles confused


POTATO-MAN saves the day! - Random
Re: Any way to move a sprite placed with ent_decal ? [Re: Kartoffel] #437091
02/09/14 07:29
02/09/14 07:29
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
Yes. You mean MOVE.
Does not work. ^^ Seams that decals cant be moved!

fex
Code:
void _testevent (PARTICLE* p){
   p.alpha -= time_step;
   if (p.alpha <= 0) p.lifespan = 0;
 //p.z -= time_step * 2; // wont work too  
}
...
   PARTICLE* p = ent_decal (you, bmMark, 7+random(3), random(360));
   p.material  = mat_model; // mat_particle, mat_sprites doesnt matter
   p.alpha     = 80;
   p.vel_z     =  3;
   p.gravity   =  3;
   p.event     = _testevent;
   set (p, MOVE | TRANSLUCENT);
   /*//and this wont do it also
   while (p && p.z > 0){
      p.z -= time_step * 2;
      wait (1);
   }*/
...

Thats why iam asking grin


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: Any way to move a sprite placed with ent_decal ? [Re: rayp] #437093
02/09/14 08:42
02/09/14 08:42
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
you have to remove the current (or use lifespan 0 I don't remember), and put a new one at new place. it works fine but can be a bit performance expensive, if you have many. somewhere I have a working solution for decal shadows placed by ent_decal, but I never used because of its slow speed in case of a few hundred moving entities...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Any way to move a sprite placed with ent_decal ? [Re: sivan] #437095
02/09/14 09:26
02/09/14 09:26
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
Read about that a few hours ago, but as u said, this is no solution. And i wanted to move the decal with BEAM flag activated. Like always : shader ? If so this effect just died for me.

Thanks to both of you anyway.


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: Any way to move a sprite placed with ent_decal ? [Re: rayp] #437098
02/09/14 09:51
02/09/14 09:51
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
what do you want to do exactly? do you really need an ent_decal?


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Any way to move a sprite placed with ent_decal ? [Re: sivan] #437103
02/09/14 10:46
02/09/14 10:46
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
Yes guess so. The sprite needs to follow the shape of the hit surface. I wanted to upgrade my bloodstain effect. I planned a sprite / particle placed via ent_decal to the target place. Then i wanted to move it slowly downwards with BEAM flag activated to "smear" the blood sprite while moving. I know how to do it with ent_create, but then its not applyed to the target's shape. Shaders i cant write ( and i dont want to ^^ ).


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: Any way to move a sprite placed with ent_decal ? [Re: rayp] #437105
02/09/14 11:11
02/09/14 11:11
Joined: Nov 2008
Posts: 946
T
the_clown Offline
User
the_clown  Offline
User
T

Joined: Nov 2008
Posts: 946
alpha_strike had this effect in his zombie game if I remember correctly, and I think he did it with decals, however, I have no idea how. I don't think a shader would solve your problem anyways as decals (again, if I remember correctly) do not work with shaders.

Re: Any way to move a sprite placed with ent_decal ? [Re: the_clown] #437111
02/09/14 13:58
02/09/14 13:58
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Decals can use shaders/ materials just fine, although some restrictions may apply.
You could create a new decal every few quants below the last one (don't remove it) and not use BEAM but an appropriate bitmap.


"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: Any way to move a sprite placed with ent_decal ? [Re: Superku] #437119
02/09/14 20:24
02/09/14 20:24
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
What a mess! ^^


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;
Page 1 of 3 1 2 3

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