Benutzerinformationen überspringen
Ankömmling
Motto: Leute, ihr müsst die Sache viel gechillter angehen.
ich hab das script von caesar mit kleinen anpassungen meinerseits
ihc habs so verändert, dass nur bei jedem 2. schritt ein sound kommt, das klingt echt besser und schöner
das script arbeitet mit terrraintags, also musst du da die art des soudn zuweisen, ich hab das script so aus meinem projekt kopiert, also hat es shcon für diverse untergründe sounds definiert, in zeile 20 kannst du den switch definieren, der die sound deaktiviert
die sounds selber häng ich noch an
viel spaß damit, gruß,
cherub
ihc habs so verändert, dass nur bei jedem 2. schritt ein sound kommt, das klingt echt besser und schöner
das script arbeitet mit terrraintags, also musst du da die art des soudn zuweisen, ich hab das script so aus meinem projekt kopiert, also hat es shcon für diverse untergründe sounds definiert, in zeile 20 kannst du den switch definieren, der die sound deaktiviert
die sounds selber häng ich noch an
|
|
Ruby Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
#============================================================================== #///////////////////////////////////////////////Step-Script\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #~~~~~~~~~~~~~~~~~~~~~by Caesar~~~~~~~~~~~~~~~~~~~~~~~~~~~ #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #************************************************************************************ class Steps def initialize #Wenn du andere Audiodateien für die Schritte verwenden willst, kannst du das "stepX.wav" durch die Namen der neuen Dateien ersetzen @audio_step0 = RPG::AudioFile.new("step2.wav", 40, 80) # Das SE, das abgespielt wird, wenn der Terrain-Tag 0 ist @audio_step1 = RPG::AudioFile.new("step8.wav", 50, 100) # 1 == wege " " " " 1 " @audio_step2 = RPG::AudioFile.new("Schritte_gras_2.wav", 15, 100) # 2= hohes gras @audio_step3 = RPG::AudioFile.new("Schritte_hall_1.wav", 30, 80) #3 = hallende schritte auf stein @audio_step4 = RPG::AudioFile.new("step_wood.wav", 30, 100) #4 = holz @audio_step5 = RPG::AudioFile.new("step2.wav", 60, 80) # 5 = Stein @audio_step6 = RPG::AudioFile.new("step6.wav", 50, 80) #6 = gepflegtes Gras @audio_step7 = RPG::AudioFile.new("step_snow.wav", 60, 100) #7 = Schnee end #------------- def play if $game_switches[36] == false # Statt der 1 musst du hier die ID des Switches angeben, mit dem du die Steps ausschalten kannst case $game_player.terrain_tag when 0 $game_system.se_play(@audio_step0) when 1 $game_system.se_play(@audio_step1) when 2 $game_system.se_play(@audio_step2) when 3 $game_system.se_play(@audio_step3) when 4 $game_system.se_play(@audio_step4) when 5 $game_system.se_play(@audio_step5) when 6 $game_system.se_play(@audio_step6) when 7 $game_system.se_play(@audio_step7) else end end end end #===================== $steps = Steps.new #============================================================================== # ¦ Game_Player #------------------------------------------------------------------------------ # # #============================================================================== class Game_Player @stepsound_yes = true #-------------------------------------------------------------------------- # ? ???? # turn_enabled : ????????????????? #-------------------------------------------------------------------------- def move_down(turn_enabled = true) # ???? if turn_enabled turn_down end # ??????? if passable?(@x, @y, 2) # ???? turn_down # ????? @y = 1 # ???? increase_steps # ???????? if @stepsound_yes $steps.play @stepsound_yes = false else @stepsound_yes = true end else # ??????????? check_event_trigger_touch(@x, @y 1) end end #-------------------------------------------------------------------------- # ? ???? # turn_enabled : ????????????????? #-------------------------------------------------------------------------- def move_left(turn_enabled = true) # ???? if turn_enabled turn_left end # ??????? if passable?(@x, @y, 4) # ???? turn_left # ????? @x -= 1 # ???? increase_steps # ???????? if @stepsound_yes $steps.play @stepsound_yes = false else @stepsound_yes = true end else # ??????????? check_event_trigger_touch(@x-1, @y) end end #-------------------------------------------------------------------------- # ? ???? # turn_enabled : ????????????????? #-------------------------------------------------------------------------- def move_right(turn_enabled = true) # ???? if turn_enabled turn_right end # ??????? if passable?(@x, @y, 6) # ???? turn_right # ????? @x = 1 # ???? increase_steps # ???????? if @stepsound_yes $steps.play @stepsound_yes = false else @stepsound_yes = true end else # ??????????? check_event_trigger_touch(@x 1, @y) end end #-------------------------------------------------------------------------- # ? ???? # turn_enabled : ????????????????? #-------------------------------------------------------------------------- def move_up(turn_enabled = true) # ???? if turn_enabled turn_up end # ??????? if passable?(@x, @y, 8) # ???? turn_up # ????? @y -= 1 # ???? increase_steps # ???????? if @stepsound_yes $steps.play @stepsound_yes = false else @stepsound_yes = true end else # ??????????? check_event_trigger_touch(@x, @y-1) end end #-------------------------------------------------------------------------- # ? ????? #-------------------------------------------------------------------------- def move_lower_left # ????????? unless @direction_fix # ????????????????????????? @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction) end # ??????? ????????????????? if (passable?(@x, @y, 2) and passable?(@x, @y 1, 4)) or (passable?(@x, @y, 4) and passable?(@x - 1, @y, 2)) # ????? @x -= 1 @y = 1 # ???? increase_steps if @stepsound_yes $steps.play @stepsound_yes = false else @stepsound_yes = true end end end #-------------------------------------------------------------------------- # ? ????? #-------------------------------------------------------------------------- def move_lower_right # ????????? unless @direction_fix # ????????????????????????? @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction) end # ??????? ????????????????? if (passable?(@x, @y, 2) and passable?(@x, @y 1, 6)) or (passable?(@x, @y, 6) and passable?(@x 1, @y, 2)) # ????? @x = 1 @y = 1 # ???? increase_steps if @stepsound_yes $steps.play @stepsound_yes = false else @stepsound_yes = true end end end #-------------------------------------------------------------------------- # ? ????? #-------------------------------------------------------------------------- def move_upper_left # ????????? unless @direction_fix # ????????????????????????? @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction) end # ??????? ????????????????? if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 4)) or (passable?(@x, @y, 4) and passable?(@x - 1, @y, 8)) # ????? @x -= 1 @y -= 1 # ???? increase_steps if @stepsound_yes $steps.play @stepsound_yes = false else @stepsound_yes = true end end end #-------------------------------------------------------------------------- # ? ????? #-------------------------------------------------------------------------- def move_upper_right # ????????? unless @direction_fix # ????????????????????????? @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction) end # ??????? ????????????????? if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 6)) or (passable?(@x, @y, 6) and passable?(@x 1, @y, 8)) # ????? @x = 1 @y -= 1 # ???? increase_steps if @stepsound_yes $steps.play @stepsound_yes = false else @stepsound_yes = true end end end #-------------------------------------------------------------------------- # ? ??????? #-------------------------------------------------------------------------- def move_random case rand(4) when 0 # ???? move_down(false) when 1 # ???? move_left(false) when 2 # ???? move_right(false) when 3 # ???? move_up(false) end end #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def move_toward_player # ??????????????? sx = @x - $game_player.x sy = @y - $game_player.y # ???????? if sx == 0 and sy == 0 return end # ????????? abs_sx = sx.abs abs_sy = sy.abs # ??????????????? if abs_sx == abs_sy # ?????????? 1 ??? rand(2) == 0 ? abs_sx = 1 : abs_sy = 1 end # ???????????? if abs_sx > abs_sy # ?????????????????????? sx > 0 ? move_left : move_right if not moving? and sy != 0 sy > 0 ? move_up : move_down end # ???????????? else # ?????????????????????? sy > 0 ? move_up : move_down if not moving? and sx != 0 sx > 0 ? move_left : move_right end end end #-------------------------------------------------------------------------- # ? ??????????? #-------------------------------------------------------------------------- def move_away_from_player # ??????????????? sx = @x - $game_player.x sy = @y - $game_player.y # ???????? if sx == 0 and sy == 0 return end # ????????? abs_sx = sx.abs abs_sy = sy.abs # ??????????????? if abs_sx == abs_sy # ?????????? 1 ??? rand(2) == 0 ? abs_sx = 1 : abs_sy = 1 end # ???????????? if abs_sx > abs_sy # ??????????????????????? sx > 0 ? move_right : move_left if not moving? and sy != 0 sy > 0 ? move_down : move_up end # ???????????? else # ??????????????????????? sy > 0 ? move_down : move_up if not moving? and sx != 0 sx > 0 ? move_right : move_left end end end #-------------------------------------------------------------------------- # ? ???? #-------------------------------------------------------------------------- def move_forward case @direction when 2 move_down(false) when 4 move_left(false) when 6 move_right(false) when 8 move_up(false) end end #-------------------------------------------------------------------------- # ? ???? #-------------------------------------------------------------------------- def move_backward # ?????????? last_direction_fix = @direction_fix # ???????? @direction_fix = true # ????? case @direction when 2 # ? move_up(false) when 4 # ? move_right(false) when 6 # ? move_left(false) when 8 # ? move_down(false) end # ???????????? @direction_fix = last_direction_fix end #-------------------------------------------------------------------------- # ? ???? # x_plus : X ????? # y_plus : Y ????? #-------------------------------------------------------------------------- def jump(x_plus, y_plus) # ???? (0,0) ?????? if x_plus != 0 or y_plus != 0 # ???????????? if x_plus.abs > y_plus.abs # ??????????? x_plus < 0 ? turn_left : turn_right # ???????????????? else # ??????????? y_plus < 0 ? turn_up : turn_down end end # ???????? new_x = @x x_plus new_y = @y y_plus # ???? (0,0) ?????????????????? if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0) # ????? straighten # ????? @x = new_x @y = new_y # ????? distance = Math.sqrt(x_plus * x_plus y_plus * y_plus).round # ??????????? @jump_peak = 10 distance - @move_speed @jump_count = @jump_peak * 2 # ?????????? @stop_count = 0 end end #-------------------------------------------------------------------------- # ? ???? #-------------------------------------------------------------------------- def turn_down unless @direction_fix @direction = 2 @stop_count = 0 end end #-------------------------------------------------------------------------- # ? ???? #-------------------------------------------------------------------------- def turn_left unless @direction_fix @direction = 4 @stop_count = 0 end end #-------------------------------------------------------------------------- # ? ???? #-------------------------------------------------------------------------- def turn_right unless @direction_fix @direction = 6 @stop_count = 0 end end #-------------------------------------------------------------------------- # ? ???? #-------------------------------------------------------------------------- def turn_up unless @direction_fix @direction = 8 @stop_count = 0 end end #-------------------------------------------------------------------------- # ? ?? 90 ??? #-------------------------------------------------------------------------- def turn_right_90 case @direction when 2 turn_left when 4 turn_up when 6 turn_down when 8 turn_right end end #-------------------------------------------------------------------------- # ? ?? 90 ??? #-------------------------------------------------------------------------- def turn_left_90 case @direction when 2 turn_right when 4 turn_down when 6 turn_up when 8 turn_left end end #-------------------------------------------------------------------------- # ? 180 ??? #-------------------------------------------------------------------------- def turn_180 case @direction when 2 turn_up when 4 turn_right when 6 turn_left when 8 turn_down end end #-------------------------------------------------------------------------- # ? ???? 90 ??? #-------------------------------------------------------------------------- def turn_right_or_left_90 if rand(2) == 0 turn_right_90 else turn_left_90 end end #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def turn_random case rand(4) when 0 turn_up when 1 turn_right when 2 turn_left when 3 turn_down end end #-------------------------------------------------------------------------- # ? ?????????? #-------------------------------------------------------------------------- def turn_toward_player # ??????????????? sx = @x - $game_player.x sy = @y - $game_player.y # ???????? if sx == 0 and sy == 0 return end # ???????????? if sx.abs > sy.abs # ?????????????????? sx > 0 ? turn_left : turn_right # ???????????? else # ?????????????????? sy > 0 ? turn_up : turn_down end end #-------------------------------------------------------------------------- # ? ?????????? #-------------------------------------------------------------------------- def turn_away_from_player # ??????????????? sx = @x - $game_player.x sy = @y - $game_player.y # ???????? if sx == 0 and sy == 0 return end # ???????????? if sx.abs > sy.abs # ??????????????????? sx > 0 ? turn_right : turn_left # ???????????? else # ??????????????????? sy > 0 ? turn_down : turn_up end end end |
zum Lesen den Text mit der Maus markieren
viel spaß damit, gruß,
cherub
Meine Scripte, nur eins öffentlich:
TBCs LightMap Script v1.1
Mein Spiel an dem ich grad arbeite:
Die Seraphim-Chroniken: Der letzte Lord Demo
Mal zu viel Freizeit?
http://www.albinoblacksheep.com/flash/demented
"Was ist schon zeit?" kann der sagen, der unsterblich ist.
TBCs LightMap Script v1.1
Mein Spiel an dem ich grad arbeite:
Die Seraphim-Chroniken: Der letzte Lord Demo
Mal zu viel Freizeit?
http://www.albinoblacksheep.com/flash/demented
"Was ist schon zeit?" kann der sagen, der unsterblich ist.
Da hat auch irgendjemand das , weggemacht, richtig heißts:
check_event_trigger_touch(@x, @y, 1)
denk ich jetzt mal, wenns dann noch immer nicht geht einfach aml so ausprobieren:
check_event_trigger_touch(@x, @y)
check_event_trigger_touch(@x, @y, 1)
denk ich jetzt mal, wenns dann noch immer nicht geht einfach aml so ausprobieren:
check_event_trigger_touch(@x, @y)
Mehr als a Allgäuer ka a Mensch it wera.
Wie soll ich wissen was ich denke, bevor ich nicht höre was ich sage?
NES-Emulator - a simple NES-Emulator
ERDL - a embedded Ruby Interpreter with the abilltiy to render images with DirectX ERDL shall be 100% compatible to RPGXP-Ruby Scripts
ERDL - a embedded Ruby Interpreter with the abilltiy to render images with DirectX ERDL shall be 100% compatible to RPGXP-Ruby Scripts
zum Lesen den Text mit der Maus markieren
Benutzerinformationen überspringen
Ankömmling
Motto: Leute, ihr müsst die Sache viel gechillter angehen.
hmmm ich finds zwar komisch, dass auf einmal ein paar zeichen verschwinden,
aber nimm doch einfach das script aus der textdatei aus dem rar-archiv,
der müsste fehlerfrei sein, ich hab ihn eigentlich nur so aus ner vorahnung heraus dazugepackt
gruß,
cherub
aber nimm doch einfach das script aus der textdatei aus dem rar-archiv,
der müsste fehlerfrei sein, ich hab ihn eigentlich nur so aus ner vorahnung heraus dazugepackt
gruß,
cherub
Meine Scripte, nur eins öffentlich:
TBCs LightMap Script v1.1
Mein Spiel an dem ich grad arbeite:
Die Seraphim-Chroniken: Der letzte Lord Demo
Mal zu viel Freizeit?
http://www.albinoblacksheep.com/flash/demented
"Was ist schon zeit?" kann der sagen, der unsterblich ist.
TBCs LightMap Script v1.1
Mein Spiel an dem ich grad arbeite:
Die Seraphim-Chroniken: Der letzte Lord Demo
Mal zu viel Freizeit?
http://www.albinoblacksheep.com/flash/demented
"Was ist schon zeit?" kann der sagen, der unsterblich ist.
Ähnliche Themen
-
Einsteigerhilfe »-
Suche Skripte
(29. November 2008, 23:58)
-
Einsteigerhilfe »-
Schrittgeräusche beim laufen auf verschiedenen Tiles
(22. August 2007, 13:43)
-
RGSS 1 Probleme & Talk »-
Schrittgeräusche
(23. Januar 2008, 16:52)
-
Einsteigerhilfe »-
Schrittgeräusche zu schnell
(18. August 2007, 20:14)
-
Events & Technik »-
Schrittgeräusche
(7. August 2005, 20:07)
