iFAction游戏制作工具

iFAction游戏制作工具

评价数不足
Loot Enemy on Death
由 PorkChip 制作
Standard procedure for enemy item drops in iFAction is for the enemy to disappear on death and for an icon animation to appear above the body as it fades out. That's fine, but not for the foragers amongst us. Here's how to make yourself a very lootable corpse!
   
奖励
收藏
已收藏
取消收藏
Script :O
Firstly, go into the Script editor at the top.
Don't worry... we're only going to change one line of script. Dead easy...
Scroll down to LEnemy and then across to the LActor tab.
Scroll down to line 640 and change sp.fadeTo(0,0); To sp.fadeTo(255,0);
Basically just making it so the enemy no longer fades on death and you are left with your lootable corpse. Click Apply and Confirm.

X and Why
Now to the meat of the project. Start by selecting your Trigger tool and then right click anywhere in your secene and select Create/Change Trigger.
Just name this something you can reference easily for later use, we don't need to do anything here just yet.
Now you want to make a new trigger to initiate the effects, so click Trigger tool from the top bar then right click anywhere in your scene and select Create/Change Trigger.
Set Trigger Conditions to Auto-Run and click on Appearing Conditions.
Double click to add and then find the Enemies tab and select the enemy you wish to loot from the drop down menu and then select Be Killed. Click confirm.
Make sure Reiterative is unchecked but Parallel is checked.
Now underneath, double click to add go to the Logic tab and select Control Variables.
Here you will create 2 new variables. Name the first one X and the second Y for reference and make them both number types, leaving default at 0. Confirm all.
For the operation, make sure it is set to =(Equal) then enter Game Data and choose your enemy from the list. Underneath this, choose X from the drop down list. Confirm.
Repeat the above but this time select your Y variable and = to your enemy Y.
Double click to add under this and find the Logic tab, then select Set Trigger Location.
Select the other trigger you made from the start from the list and then select Designation with Variables.
Now it's just a case of matching the X and Y up with your X and Y variables. This will allow the game to identify where the corpse is in the scene so it places the new event correctly on death.
Apply and confirm everything here and we are done with this trigger.
Your bloodstained gift!
Next, we right click on our first trigger and select Create/Change Trigger.
Set the conditions at Actor Touch/Press Confirm, make sure all boxes are unchecked and everything else set at No.
Now Double click to add beneath and go to the Others tab and select Change Item. Confirm and Apply all in the trigger.
Find whichever item you want and that's it, we're all done here. Of course you can add text saying the player found such and such etc...
For best results, it is preferable for you to set up a random loot event in conjunction with this.
Please refer to my Random Loot Chest Guide in the Steam Guides for information on how to achieve this... and rate it up, it's awesome... ahem...
So that's not all we can do. This corpse is now treated as generic trigger so the possibilities are endless...
You could even use it to open up a shop if you wanted to. Bit weird, but anyway...
The bottom line as always is to experiment and have fun!
1 条留言
Reaper 2021 年 4 月 4 日 上午 7:31 
Aweaome, thnx!