Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Item_Script.txt, copy-pasted from official Danmakufu ph3 documentation on item scripts, comments removed.
- @Initialize
- {
- SetDefaultBonusItemEnable(false);
- let dir = GetCurrentScriptDirectory();
- LoadItemData(dir ~ "Item_Data.txt")
- }
- @MainLoop {
- yield;
- }
- @Event
- {
- alternative(GetEventType())
- case(EV_GET_ITEM)
- {
- let itemType = GetEventArgument(0);
- let objItem = GetEventArgument(1);
- }
- case(EV_DELETE_SHOT_TO_ITEM)
- {
- let objShot = GetEventArgument(0);
- let objPos = GetEventArgument(1);
- TUserItem(objPos[0], objPos[1]);
- }
- }
- task TUserItem(let itemX, let itemY)
- {
- let obj = CreateItemU1(1, itemX, itemY, 10000);
- ObjItem_SetDefinedMovePatternA1(obj, ITEM_MOVE_TOPLAYER);
- }
- //End of script
- //Item_Data.txt
- #UserItemData
- item_image = GetCurrentScriptDirectory() ~ "Point Sheet.png"
- //Error: "item_image is not defined." on startup.
- ItemData { //Power Item
- id=0
- value=0
- AnimationData {
- animation_data=(10,3,3,16,16)
- animation_data=(10,19,3,32,16)
- }
- out=(35,3,48,16)
- }
- ItemData { //Point Item
- id=1
- value=1
- AnimationData {
- animation_data=(10,3,19,16,32)
- animation_data=(10,19,19,32,32)
- }
- out=(35,19,48,32)
- }
- ItemData { //1UP
- id=2
- value=2
- AnimationData {
- animation_data=(10,51,3,84,36)
- animation_data=(10,85,3,118,36)
- }
- }
- ItemData { //Bomb
- id=3
- value=3
- AnimationData {
- animation_data=(10,51,35,84,68)
- animation_data=(10,85,35,118,68)
- }
- }
- //End of script
- //System.txt (only the initialize section)
- @Initialize
- {
- StartItemScript(GetCurrentScriptDirectory() ~ "Item_Script.txt");
- //a bunch of system tasks after...
- }
Add Comment
Please, Sign In to add comment