Gamestudio Links
Zorro Links
Newest Posts
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
3 registered members (AndrewAMD, degenerate_762, ozgur), 1,311 guests, and 0 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
(fake) Shadows staying under a character #116758
03/12/07 10:43
03/12/07 10:43
Joined: Aug 2006
Posts: 128
Papua New Guinea
I
Impaler Offline OP
Member
Impaler  Offline OP
Member
I

Joined: Aug 2006
Posts: 128
Papua New Guinea
Hi,
I've noticed that the simple shadow script in the templates is impossible for me to recreate, because the shadow sprite must c_trace downwards to the ground an stay under the object, but when it traces it produces a you pointer to whatever it hit, and that "you" will replace the original thing that it's supposed to stay under. Now I've heard that you can use arrays to solve this, but the thing is I havn't used arrays yet and can't see how you could use them to keep track of the original object.


Murphey's Law:
<< if anything can go wrong, it will >>

(Murphey was an optimist).
Re: (fake) Shadows staying under a character [Re: Impaler] #116759
03/12/07 12:29
03/12/07 12:29
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
hi
do you know "handles"?

check out
handle()
in the manual. Very useful function.
pseudocode:
action of the shadow: get the handle of it's "parent" (the object creating the shadow) and save it into one of my skills:
my.skill1 = handle(you);
then, use ptr_for_handle(my.skill1) to place the shadow underneath the "parent".
then you can trace downwards to see how far down you must move it.

It's basically the same, except that you don't use "you" twice, instead you use ptr_for_handle(my.skill1) which is basically the same as a pointer.


Hope this helps...
look up "handle" in the manual.
Micha


~"I never let school interfere with my education"~
-Mark Twain
Re: (fake) Shadows staying under a character [Re: Germanunkol] #116760
03/18/07 11:11
03/18/07 11:11
Joined: Aug 2006
Posts: 128
Papua New Guinea
I
Impaler Offline OP
Member
Impaler  Offline OP
Member
I

Joined: Aug 2006
Posts: 128
Papua New Guinea
Oh my goodness! That's exactly what I've been wanting to hear for months! Yes! Yes! That makes heaps of problems instantly solved for me! Thanks so much!


Murphey's Law:
<< if anything can go wrong, it will >>

(Murphey was an optimist).

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