| Blockland Forums > Modification Help |
| Pre Events |
| << < (2/6) > >> |
| jes00:
--- Quote from: Chrono on June 27, 2011, 09:21:13 PM ---Look at the checkpoint brick that comes with the game. --- End quote --- D: that code looks even more complicated then the JVS door's. |
| Chrono:
--- Code: ---function brickCheckpointData::onPlant(%data, %obj) { %obj.enableTouch = true; %enabled = 1; %delay = 0; %inputEvent = "OnPlayerTouch"; %target = "Self"; %outputEvent = "PlaySound"; %par1 = Beep_Popup_Sound.getId(); %obj.addEvent(%enabled, %delay, %inputEvent, %target, %outputEvent, %par1); } function brickCheckpointData::onLoadPlant(%data, %obj) { Parent::onLoadPlant(%data, %obj); %obj.enableTouch = true; } --- End code --- How is that complicated? |
| jes00:
--- Quote from: Chrono on June 27, 2011, 09:46:10 PM --- --- Code: ---function brickCheckpointData::onPlant(%data, %obj) { %obj.enableTouch = true; %enabled = 1; %delay = 0; %inputEvent = "OnPlayerTouch"; %target = "Self"; %outputEvent = "PlaySound"; %par1 = Beep_Popup_Sound.getId(); %obj.addEvent(%enabled, %delay, %inputEvent, %target, %outputEvent, %par1); } function brickCheckpointData::onLoadPlant(%data, %obj) { Parent::onLoadPlant(%data, %obj); %obj.enableTouch = true; } --- End code --- How is that complicated? --- End quote --- I don't get the %par1 |
| Gambsy:
%par1 is created the line before " %par1 = Beep_Popup_Sound.getId();" and all it is doing is telling it what sound to play, like on the event you pick "Bep_Poppup |
| Chrono:
--- Quote from: jes00 on June 28, 2011, 08:01:45 AM ---I don't get the %par1 --- End quote --- Parameter 1. You know, the first selectable option for PlaySound. |
| Navigation |
| Message Index |
| Next page |
| Previous page |