This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-06-16 04:00:48

darkfuji
New Scratcher
Registered: 2012-06-16
Posts: 4

need help with a script (warning the answer may be obvious i am new)

i am trying to make a simple rpg using this engine but for some reason i cant seem to find a script that does what i need. i need something like: if enemy 1 health = 0 sprite 2 go to x 107 y 126, set enemy 2 heal to 25 sprite 8 go to x 163 y -54, set health to 25 set magic to 120 set level to 2.

Offline

 

#2 2012-06-16 04:04:04

darkfuji
New Scratcher
Registered: 2012-06-16
Posts: 4

Re: need help with a script (warning the answer may be obvious i am new)

p.s can i get the answer in scratch blocks.

Offline

 

#3 2012-06-16 04:07:43

darkfuji
New Scratcher
Registered: 2012-06-16
Posts: 4

Re: need help with a script (warning the answer may be obvious i am new)

darkfuji wrote:

i am trying to make a simple rpg using this engine but for some reason i cant seem to find a script that does what i need. i need something like: if enemy 1 health = 0 sprite 2 go to x 107 y 126, set enemy 2 heal to 25 sprite 8 go to x 163 y -54, set health to 25 set magic to 120 set level to 2.

sorry it is health not heal.

Offline

 

#4 2012-06-16 04:16:53

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: need help with a script (warning the answer may be obvious i am new)

when gf clicked
forever if <(enemy 1 health) < [1]>
broadcast [move1 v] and wait
set [enemy 2 health v] to [25]
broadcast [move2 v] and wait
set [health v] to [25]
set [magic v] to [120]
set [level v] to [2]
end
Put this script below on sprite 2
when I receive [move1 v]
go to x:[107] y:[126]
stop script
Put this script below on sprite 8
when I receive [move2 v]
go to x:[163] y:[-54]
stop script


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#5 2012-06-16 05:04:41

darkfuji
New Scratcher
Registered: 2012-06-16
Posts: 4

Re: need help with a script (warning the answer may be obvious i am new)

Wes64 wrote:

when gf clicked
forever if <(enemy 1 health) < [1]>
broadcast [move1 v] and wait
set [enemy 2 health v] to [25]
broadcast [move2 v] and wait
set [health v] to [25]
set [magic v] to [120]
set [level v] to [2]
end
Put this script below on sprite 2
when I receive [move1 v]
go to x:[107] y:[126]
stop script
Put this script below on sprite 8
when I receive [move2 v]
go to x:[163] y:[-54]
stop script

thanks

Offline

 

Board footer