in this ss the moment the whip’s collision object (p1hit) is created i assigned a variable that i use in other events to assign various kind of attributes (DMG, elements,effects ecc…) and do enemy dmg at collisions.This works bcs at creation is picked so after the deletetion i can re-whip again with the same or different weapon to get different dmg.
2)I here i’m throwing a dagger to the enemy with the bullet extension
Here i want the same thing…but bcs i may have more than 1 bullet on the screen without cancel or deletetion i can’t figure out how to separate each bullet var while they move around… i’ve the repeat for each…and it works…
but i guess that bcs the creat object is integrated in the extension behaviour, …the bullet is not picked so the trick above (for the whip) dowesn’t work in this case.
here a vid
I wonder if i’m missing something here…probably due to overwork…
i’m thinking to edit the extension at bullet creation …or maybe… if it should be interpreted as a feature request…
It’s changing the variable for p1
In a subevent, it’s creating the same object.
I think what’s happening is that the act of changing the variable is causing the objects to be picked. So, when you change the variable again after the object is added. It’s changing the value of the object variable for the new and old objects. I don’t think it should don’t that but I was told by someone from GD that it’s how it’s supposed to be.
Try adding a subevent and moving the actions the actions that set the value of the existing objects to the subevent. That will make it so the other events aren’t a subevent of the actions.
Here’s how I tested it using an action to rotate the bullet. When the variable action is where the scribble is then all of the bullets rotate. But when the actions are moved to their own subevents that are equal to fhe other events, it works. The variable actions create their own object list but since the other events aren’t subevents, the other actions don’t use that list.
If i can find my previous post, I’ll add a link to it.
at collision i calculate DMG on enemy.
My weapons system assign a variable at creation for each weapon to detect the equipped slot and which weapon started the attack.
While it works …let’s say for phisical weapons (sword,whip,axes,doble hands ecc…) ,i can’t calculate the dmg for bullet…cos they don’t reset at a hit. …cos i guess i can’t delete em…
at collision i calculate DMG on enemy.
My weapons system assign a variable at creation for each weapon to detect the equipped slot and which weapon started the attack.
While it works …let’s say for phisical weapons (sword,whip,axes,doble hands ecc…) ,i can’t calculate the dmg for bullets…cos they don’t reset at a hit. …cos i guess i can’t delete em…
i know i can fix it by creating a dagger object and adding a force on direction of the attack…this way the dagger is picked at creation and the variable follow the bullet until it hit something…
I can’t get this result with the bullet extension…it looks like the bullet in extension is picked like a group of objects instead of a single created bullet
more in depth…
let’s say i attack with a whip , i do 50 dmg, during the same attack
i throw a dagger that do 10 dmg.
the moment i attack with the whip during the same attacki have 60 dmg.
Is the bullet related to p1hit? Or is that just for non-bullets. Are you detecting the collision with the bullets? Do the bullets need similar variables as the p1hit or am I way off base.
i have this Var DMG that change depending on equipped weapons…There are two kind of attacks depending on the button pressed.
1)let’s say i attack with a whip —50 dmg done.
2) i throw a dagger—assigning to that dagger 10 dmg.
3) i throw a second dagger–that idd do 10 dmg.
4) while the daggers are stll in air…another whip attack…with 60 dmg…(this is unwanted)
I may be wrong but when you manually create a bullet object; you can use for each object condition than assign a var to that bullet at creation cos is picked.
That bullet keep that var as long it does hit something.And you can edit that variable for the next bullet…when created
I basically want to reset the dmg value the moment the non-bullet attack is done
while bullets are still in air…and they can still hit with their DMG var…for any weapons.
I found this easier to do with non-bullet weapons cos at the end of their animations they are deleted so the next attack can start. But for bullets, since they’re still in air during attacks, i’m not able to restart the dmg value at each attacks bcs they’re still in air. …and ofc i don’t want to delete em if they don’t hit something.
I’m not able to do it with the bullet extension.
If it can help this is my damage formula…(not simplified yet…but pretty simple)…don’t mind the resistence…they’re not implemented yet
Trying to fix this problem i decided to separate my group of attacks with bullet attacks (p1blullet) and weapons white attacks (p1hit).
There is an addition between the two.
When one of the two objects is created the other part of the formula is zero and vice versa…at least it is what i would like…
…it looks like to have a var for each single bullet while they’re still in air and while the player concatenate attacks… …awsome …in words
thaz why i’m still not sure this is an how do i instead of a feature request…
Ok… let’s to try to simplify things a la How Do I.
How do i
assign a Variable for each bullet that is kept to that bullet until collision while other bullets are fired and other attacks are performed that change the same variable…(while the bullet is still in the air).
with the Fire Bullet extension
hopefully i’m gonna get something i can fit.
this is easily fixable with manual bullet creation, but since i may gonna need some shoot effects, angle ecc…later if possible i prefer the extension
ok more in depth what happen:
when the first attack and the second one happen (whip and bullet) the formula above is the result of the Addition of both damages.(before the collision)…something i don’t want…
i need a method that nullify the shoot after each bullets (or any other attacks) is fired…this is drivin me nuts…(but it was expected)…
The ID was assigned to each bullet as the fire behavior created them. When they collided with my test object, a wall, the ID of the bullet was still the same as the value it was originally given.
Objects are identical whether you create them or the behavior does. The only thing you need to make sure is there are no other bullets picked when the object is created because old objects can be set to the new value. When reading the value of a bullet, you need to make sure that only 1 bullet is picked otherwise it will use the oldest object and read its value. You also need to only take a bullet into account when it’s in collision and the delete the object.
This formula use both the hit and bullet to calculate the damage.
that is indeed what i need…and i can’t figure out…
you used ID , i used secondwepn variable…both do the same things. (second screenshot).
About the formula i already had in mind to split it up…i tried what i can to automate the process…bcs 2 patterns of attacks is still manageable…i wonder what will happen with 4 or 5…
edit: but wait you used the counter trick…(btw i hate it)
if u 're telling me that the extension still pick the object at creation i’m gonna try the same…cos it doesn’t looks so to me…but i may be wrong
ok…let’s try…it will needs a while…i’m gonna report here…moved to how do i.
Keith i’m gonna change everything again…
I’m gonna use IDs for each attacks , so i can merge every attack to a group and simplify the whole thing…the answer was there…but when you have so many things on the screen it’s hard to remember everything.
Thx again for your input…i totally forget about the counter trick.
Thaz what i would like…Problem is sometimes it happens sometimes don’t.
I deunnpo if due to the speed of bullets (cos the collision may be skipped…)
I still dunno if i can implement this without problems…
I mean i need to be sure that it happens when it should happen.
Also some enemies bullets are 2d particles objects (mosts spherical) whit their untouched collision masks. I noticed that check collision with 2d parrticles works but it’s a bit tricky.
Edit: i want to point out that my collisions aren’t working bcs the 2D particles tiny emitter’s box…i opened a feature request for this.
Until then. i’ll use proxy for collisions.
whoever is reading this please ignore this last post