Need help with shooting and monsters killing you.
-
@iTap-Development Sorry, what do you mean about custom particles? Precaching them by firing the particle emitter before needed?
-
@Deeeds it was just an example of something you could do with my idea. But what I’m saying is you could create your own particle by spawning all the of objects you need OFF SCREEN (instead of spawning as you need them, since spawning is a slower behavior) and then using broadcast message to have them do whatever it is you want for the particle. And you would probably want to name then numerically.
-
@iTap-Development Cool. Got it. For me, quite annoyingly, I can do this kind of looping in code quite elegantly, but really struggle with the mechanics and messy way it needs to be done in hyperPad. But really need to do this simply to overcome the lack of parenting and non-physical attachments and relationships between objects.
-
@iTap-Development let me see if I've got this right:
A loop broadcasts, in the loop is a call to a variable that's incrementing with each cycle of the loop, and being used to ID objects? What I'm missing is how the name/ID of the objects is created so that this name can be stored in an array or dictionary. The lack of ability to hold a reference to, or address of, an instance of an object is... troubling me.
-
@iTap-Development As is the lack, I think, of abilities to dynamically rename/name objects. I can't figure that part out, either. I'm missing something in conceiving how hyperPad handles spawning, and what it was intended to be and do.
-
@Deeeds yep you could use a loop or create your own, I guess depending on you needs.
So you are saying you want to have an array of the objects you’ve created so you know what to broadcast? I don’t think that would be necessary with numerically named id but if you want names like wall 1 or enemy 3 then I can see where that would come in. So if I understand correctly, just put id’s in an array when you create the objects.
I don’t think anyone will argue that we need everything to be dynamic. I would honestly prefer dynamic everything came before new features, since no dynamic means less use for the features.Spawned objects are basically exact replicas of the object. They can, for the most part, work independently with the exception of not being able to be talked to by object name. Although you can use tags for limited use, for example put a tag on the object and then it or any of its spawned objects could have a collide behavior with that tag, and then when one collides only that one would react.
-
@iTap-Development Cheers. I'll do some more mulling and experimenting. There are other things I'm doing and exploring and working around the ways of hyperPad, and with it... I agree... dynamic addressing needs to be first, before even functions, parenting, Undo in behaviours, etc.
-
@Deeeds here are some screen shots from the tutorial with some basic explanations...hope it helps!
-
@Deeeds how you assign them an ID depends on what you want to use them for.
If you have a game with objects you want to select by position, their IDs could be based on the X and Y position.
If you want to be able to select the Nth spawned object or just give an object a unique ID, create an attribute on some non-spawned object that always exists, and let the spawned object get this value, set it as its ID, and increment the value by 1.
You can use this kind of thing to add a relationship between objects. If you want a long and probably hard to follow example I'm making a game right now where an enemy spawns a hitbox for a sword thrust, that will damage the player, unless the player is parrying, which will deflect the hit and stun the opponent for a moment.
Enemies spawn a hitbox are spawned using a broadcast message, broadcasting to 'damageBox' with the value being an array of information (owner position, rotation, offset to spawn at, etc).
I have an empty object that is never destroyed that receives this message. When the message is received, it uses an internal object counter in the form of a box container, which is incremented by 1 each time. It combines this with text to make a unique attribute for each hitbox being spawned. It sets this attribute to the array of values.
The hitbox object is simply an empty object that uses the values passed on to it to calculate the position and rotation it should go to. It uses an incremental ID attribute on the main empty object to get the attribute that was set before (a work around because when multiple run at once there is a slight delay before spawned objects run, so they would all get the last attribute without an ID system). The Hitboxes set an attribute to the ID of their owner.
The player has behaviours when collided with the hitbox, if the player is parrying it will get the hitbox' owner attribute and broadcast to combine text of "parry" and the owner ID. The owner has a receive message for this that causes it to turn of its behaviours for a moment.
-
@Jack8680 @iTap-Development Thank you both very much... I'm knee deep in graphic design at the moment, and considering how that influences what I can do, and want to do... but will get to this in a few hours, I hope.
-
@Jack8680 I've read this a dozen times, and I still can't see how to have a reverence to an object so I can tell it to "go to this position!"
-
@Deeeds do you understand how to trigger an objects behaviors with the broadcast? If so, you just put the position(as an array) in the value field of the broadcast behavior and then you can use it in the object to set the position.
-
@iTap-Development Again, the problem is one of reference. For example, how does an object reference itself?
-
@Deeeds what do you mean reference itself? Like trigger it’s own behaviors with broadcast?
-
@iTap-Development In just about every known modern language there is the concept of self, either explicitly or implicitly. This means an object can call functions on itself and inspect its own elements. I don't see this ability in the workaround that is spawning objects in hyperPad.
-
@Deeeds so by call functions you mean trigger it’s own behaviors? And define “inspect elements”, what elements are you wanting to inspect?
-
@iTap-Development This is a theoretical and conceptual question, not a specific one.
-
@Deeeds good grief! How’s anyone going to help you then?
And why do you need help? Theorize elsewhere. -
@iTap-Development Because understanding HOW things work is like this:
Teach a man to fish... etc
Too subtle for you?
-
@Deeeds no one needs the theory, because most can probably do it!
And how will you teach him to fish? “The concept is simple, throw the hook in the water. Now theoretically the fish should bite....so go catch some fish!”