Discuss Scratch

derfloppmiau
Scratcher
8 posts

Advanced Coding

Feel free to comment here on anything that you consider “advanced” coding (from Scratch or elsewhere)







Doing scrolling with the Mouse Wheel is possible!!!

when [up_arrow v] key pressed
if <not <key [up_arrow v] pressed?>> then
change [scroll v] by (-1)
if <(scroll) < [0]> then
set [scroll v] to [0]
end
end

when [down_arrow v] key pressed
if <not <key [down_arrow v] pressed?>> then
change [scroll v] by (1)
if <(scroll) < (max_scroll)> then
set [scroll v] to (max_scroll)
end
end
AbdelkefiSlim
Scratcher
10 posts

Advanced Coding

I was thinking how are we gonna implement a way to display the abilities for several clones , [
not only that , the clones of the abilities needs to be identified from what clone it was triggred in order to inflict the right amount of damage.
-Squiggle
Scratcher
100+ posts

Advanced Coding

AbdelkefiSlim wrote:

I was thinking how are we gonna implement a way to display the abilities for several clones , [
not only that , the clones of the abilities needs to be identified from what clone it was triggred in order to inflict the right amount of damage.
(woah that's a confusing way of explaining it…)
Do you mean you need to find a way to show what each clone is doing, or get each clone to do a different thing - or is that really basic compared to what you're intending to do?
Or do you want something to detect how much damage it needs to inflict on each specific clone?

●●● Hey, Squi here! My profile | My latest project ▌-Squiggle ║♀║ 13 ║ ♬ ║ ✎ ║ ✞ ║☺║ ♻ ▌ ●●●
●●● Please say hi. I like meeting new people ●●●
>> Yayyyy you found the secret message <<
derfloppmiau
Scratcher
8 posts

Advanced Coding

AbdelkefiSlim wrote:

I was thinking how are we gonna implement a way to display the abilities for several clones , [
not only that , the clones of the abilities needs to be identified from what clone it was triggred in order to inflict the right amount of damage.

In our case, it probably may be more efficient if we handle each Bot as a different object, because many clones always cause laggs. But in other cases, the only way I know, how to give a clone an “ID”, is with different costumes, so each clone has another costume-number.
-Squiggle
Scratcher
100+ posts

Advanced Coding

derfloppmiau wrote:

AbdelkefiSlim wrote:

I was thinking how are we gonna implement a way to display the abilities for several clones , [
not only that , the clones of the abilities needs to be identified from what clone it was triggred in order to inflict the right amount of damage.

In our case, it probably may be more efficient if we handle each Bot as a different object, because many clones always cause laggs. But in other cases, the only way I know, how to give a clone an “ID”, is with different costumes, so each clone has another costume-number.
Yes, either costume names or a ‘this sprite only’ variable which changes after each clone is created.

●●● Hey, Squi here! My profile | My latest project ▌-Squiggle ║♀║ 13 ║ ♬ ║ ✎ ║ ✞ ║☺║ ♻ ▌ ●●●
●●● Please say hi. I like meeting new people ●●●
>> Yayyyy you found the secret message <<
AbdelkefiSlim
Scratcher
10 posts

Advanced Coding

derfloppmiau wrote:

AbdelkefiSlim wrote:

I was thinking how are we gonna implement a way to display the abilities for several clones , [
not only that , the clones of the abilities needs to be identified from what clone it was triggred in order to inflict the right amount of damage.

In our case, it probably may be more efficient if we handle each Bot as a different object, because many clones always cause laggs. But in other cases, the only way I know, how to give a clone an “ID”, is with different costumes, so each clone has another costume-number.


But what if the champion was picked twice ?
in that case we need clones
derfloppmiau
Scratcher
8 posts

Advanced Coding

AbdelkefiSlim wrote:

derfloppmiau wrote:

AbdelkefiSlim wrote:

I was thinking how are we gonna implement a way to display the abilities for several clones , [
not only that , the clones of the abilities needs to be identified from what clone it was triggred in order to inflict the right amount of damage.

In our case, it probably may be more efficient if we handle each Bot as a different object, because many clones always cause laggs. But in other cases, the only way I know, how to give a clone an “ID”, is with different costumes, so each clone has another costume-number.


But what if the champion was picked twice ?
in that case we need clones


That was not what I said
I meant that every Bot has his own object, with all the scripts and animations for each champion. That's much work, but it will perform much better than working with clones (we may still work with clones for the abilities and minions).
AbdelkefiSlim
Scratcher
10 posts

Advanced Coding

yes ! we need clones for abilities now tell me
how are u gonna define each clone of an ability in order to inflict the right amount of damage
is there any way to detect from who this clone was made.
AbdelkefiSlim
Scratcher
10 posts

Advanced Coding

im going to work on a prototype soon and see if i can figure out the best way possible for this.
derfloppmiau
Scratcher
8 posts

Advanced Coding

AbdelkefiSlim wrote:

yes ! we need clones for abilities now tell me
how are u gonna define each clone of an ability in order to inflict the right amount of damage
is there any way to detect from who this clone was made.

In a MOBA we do not need to know who cast the spell, we just need to know in which team he was, so we know who gets damaged and who not. To do this, probably two costumes would be nice (one for team 1, one for team 2).
AbdelkefiSlim
Scratcher
10 posts

Advanced Coding

derfloppmiau wrote:

AbdelkefiSlim wrote:

yes ! we need clones for abilities now tell me
how are u gonna define each clone of an ability in order to inflict the right amount of damage
is there any way to detect from who this clone was made.

In a MOBA we do not need to know who cast the spell, we just need to know in which team he was, so we know who gets damaged and who not. To do this, probably two costumes would be nice (one for team 1, one for team 2).
im gonna try and see if it works perfectly
AbdelkefiSlim
Scratcher
10 posts

Advanced Coding

derfloppmiau wrote:

AbdelkefiSlim wrote:

yes ! we need clones for abilities now tell me
how are u gonna define each clone of an ability in order to inflict the right amount of damage
is there any way to detect from who this clone was made.

In a MOBA we do not need to know who cast the spell, we just need to know in which team he was, so we know who gets damaged and who not. To do this, probably two costumes would be nice (one for team 1, one for team 2).
your idea is good though easy and effecient

Powered by DjangoBB

Standard | Mobile