| Blockland Forums > Modification Help |
| Explosion: Continuous shockwave |
| << < (3/4) > >> |
| takato14:
--- Quote from: Red_Guy on January 04, 2011, 06:30:31 PM ---schedule works 2 ways: 1) schedule(delay, 0, function, args) 2) object.schedule(delay, function, args) - this calls function' on object takato14 - put some echo() statements in your code to see whats going on. Once you get past trivial scripts, the "compile and pray" method doesnt work anymore. --- End quote --- Actually. I typed almost all of this code up myself. I used other scripts as examples. Implying that I copy-pasted sections from other codes is only going to make me mad. I have a logical idea of how this is supposed to work, I'm just not completely sure on the syntax. |
| takato14:
Okay, I did the echo, and the LaunchWave function isnt being called. |
| Red_Guy:
--- Quote from: takato14 on January 04, 2011, 10:45:03 PM ---Okay, I did the echo, and the LaunchWave function isnt being called. --- End quote --- well there is a good start. is DoomNukeRocketProjectile::onExplode being called? if so - change it to: --- Code: ---function DoomNukeRocketProjectile::onExplode(%this,%obj) { parent::onExplode(%this, %obj); %this.schedule(400, "LaunchWave", %obj, 1); } --- End code --- if onExplode isnt being called - then theres an erorr somewhere else in your code. |
| phflack:
--- Quote from: Red_Guy on January 04, 2011, 06:30:31 PM ---schedule works 2 ways: 1) schedule(delay, 0, function, args) 2) object.schedule(delay, function, args) - this calls function' on object --- End quote --- ah, i haven't been using objects, so that's probably why i had no clue :D |
| takato14:
--- Quote from: Red_Guy on January 05, 2011, 08:06:11 PM ---well there is a good start. is DoomNukeRocketProjectile::onExplode being called? if so - change it to: --- Code: ---function DoomNukeRocketProjectile::onExplode(%this,%obj) { parent::onExplode(%this, %obj); %this.schedule(400, "LaunchWave", %obj, 1); } --- End code --- if onExplode isnt being called - then theres an erorr somewhere else in your code. --- End quote --- onExplode gets called. I'll try that. |
| Navigation |
| Message Index |
| Next page |
| Previous page |