Page 1 of 1

[REQUEST] Understanding actor pointers

PostPosted: Fri Jul 03, 2015 11:08 am
by Double(Super)Shotgun
The wiki entry has a lot of information, but I think it assumes a slightly higher level of programming understanding from users. I think this might be a fairly easy-to-understand topic, at least for basic implementations, but as it stands I'm having trouble even getting the gist of the basics. For example, I don't get what tracers do, how they differ from the target category, at all. Is it something to do with where an actor is 'aiming', somehow? That's the kind of question I'm having.

If nobody feels up to it, once I wrap my head around the subject (and if I even then feel competent enough to talk on it), I'll turn this thread into short tutorial on actor pointers. :geek:

Also, I realize it probably IS meant for modders who already know what they're doing, but even so, a brief explain-it-like-I'm-five explanation might work wonders.

Re: [REQUEST] Understanding actor pointers

PostPosted: Fri Jul 03, 2015 2:35 pm
by Arctangent
Are you having trouble understanding the second, third, and fourth sections of the page? Those explain the usage of the points for projectiles, monsters, and special cases, respectively, and they seem pretty clear to me.

Re: [REQUEST] Understanding actor pointers

PostPosted: Wed Sep 16, 2015 5:22 am
by ibm5155
Isn't pointers the same explanation as C pointers?

Re: [REQUEST] Understanding actor pointers

PostPosted: Sat Sep 19, 2015 12:26 pm
by Ghastly
ibm5155 wrote:Isn't pointers the same explanation as C pointers?
Yes, but those are honestly pretty hard to understand if you don't know programming or are new and coming from a language like Java. Additionally, a lot of textbooks don't explain pointers very well, usually explaining them like "it points to this area of memory, so if we add this amount to the pointer, we're then pointing at this other area of memory" which makes them seem useless.

So still, for those who aren't familiar and comfortable with C pointers, a tutorial would still be useful.

Re: [REQUEST] Understanding actor pointers

PostPosted: Fri May 06, 2016 2:35 pm
by Harbltron
Literally joined the forums just for help in understanding pointers... the wiki is pretty unforgiving to those of us with no coding background.

A basic primer on pointers for newbies would be indispensable.

Re: [REQUEST] Understanding actor pointers

PostPosted: Fri May 06, 2016 2:57 pm
by Arctangent
I think you guys are overthinking it; as far as the stuff you need to know to make use of them in Decorate and such, they're just variables that "point" to other actors.

Basically, when a projectile is spawned by a projectile function, its target pointer is usually set to the actor that spawned it. Because of this, you can use the projectile's target pointer to refer to its spawner.

It's not terribly complicated, and there names are pretty self-explanatory except for the fact that a projectile's target is its spawner ( its actual target is its tracer, although that requires specific setup to be used in normal circumstances ). For example, a monster's target is stored in the target pointer, which means you can refer to its target through that pointer.

Re: [REQUEST] Understanding actor pointers

PostPosted: Thu Feb 02, 2017 5:45 am
by ibm5155
an actor pointer is quite easy.
It's just like your house address, it's a unique text/number and there'll be no other house with the same address around your city.
so, if you gave your house address to someone, they'll know how to find you, and also they'll know the size of the terrain, how old is it,...

And in the doom world, it's the same thing, the actor pointer is just the address from where this actor is on the memory, with that, you could know where the monster is, his health, the state...
So when you set like, the target pointer to a barrel. a monster will know where that barrel is and he'll try to follow an imaginary line betwhen he and the barrel.

And if you gave a wrong pointer (ie a wrong house address) either the actor and your friends will get lost to go to it...

EDIT: kinda old question but it's on tutorial folder so someone else may help with this if they are looking about what the heck are actor pointers