Author Topic: Crash when objectevent "hit" on walls  (Read 4303 times)

CrusaderDeleters

  • Posts: 102
  • The Great Crusader
    • View Profile
Crash when objectevent "hit" on walls
« on: July 04, 2014, 11:30:08 PM »
http://pastebin.com/T1XVSMtj
I'm trying to get a non-cracked wall to be hit with a sword, and when it's hit 10 times, it gets deleted, and a cracked wall underneath becomes shown, where that one is hit a few times and finally breaks.

I'm using a set of scripting that's cleaner than the one used in the campaign.
http://i.imgur.com/BmoLEwH.png
There's also layer changes so it changes the layer to the same as the player.

Here's another that works the same way as previous, but visually is the same as the version in the main campaign.
http://i.imgur.com/g8Rx9IY.png
And this one works perfectly, exactly the same as the one in the campaign.
The King of Maernol

Myran

  • Developer
  • Posts: 183
    • View Profile
Re: Crash when objectevent "hit" on walls
« Reply #1 on: July 05, 2014, 12:11:24 AM »
How are your delays from the on hit trigger? I'd guess you want a delay of 1 to all the check variables so that it increments the variable before it checks (or connect to the checks from the increment instead of from the trigger). Hm, that shouldn't cause a crash though.

CrusaderDeleters

  • Posts: 102
  • The Great Crusader
    • View Profile
Re: Crash when objectevent "hit" on walls
« Reply #2 on: July 05, 2014, 12:29:34 AM »
The hit trigger actually works perfectly on the less-complicated one. It changes the variable THEN reads it. I was expecting to have to delay it, but it worked well.
And yeah, it shouldn't. It should cause a misread of the variable, but not a crash.
The King of Maernol

CrusaderDeleters

  • Posts: 102
  • The Great Crusader
    • View Profile
Re: Crash when objectevent "hit" on walls
« Reply #3 on: July 05, 2014, 03:08:20 AM »
Update: I fixed the problem.
Here, http://i.imgur.com/BmoLEwH.png I figured out that the Variable Checker (The one that leads to the Object Destroy, Play Sound, and Layer Change) did NOT use the variable as a variable. The Variable was actually set to the "On True" portion.

Could we have a different colored checkered line to tell the difference? :)

Edit: On even better news, how the On Hit works, it won't activate twice, even though I'm hitting both of the walls at the same time.
« Last Edit: July 05, 2014, 03:10:58 AM by CrusaderDeleters »
The King of Maernol