Page 13 of 396
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 10:54 am
by Blichew
1. How do I remove the natural loot that a monster can drop? I want to use a watered-down Skeleton Commander as an early boss, but I can't seem to stop him from dropping his longswords. I want him to drop what I say, and nothing more.I know there is a "setLootDrop" component but it asks for a table and I don't know what to put.
I assume you want to change only this one Skeleton Commander, if that's the case just use:
Code: Select all
skeleton_commander_1.monster:setLootDrop = { }
2. When editing equipment, I can't seem to remove item properties. For example, when basing a new cloak off the "bear pelt", I tried "new_cloak.equipmentitem:setResistCold(0)". That sets the cold resist to 0, but unfortunately doesn't remove the tooltip from the item. When you hover over it, it says "Resist Cold +0". I need to get rid of that completely.
Just a wild guess: have you tried editing item description with
Code: Select all
ItemComponent:setDescription(string)
?
4. I need to spawn an edited item inside a container or on the floor. Whenever I spawn one, it just appears in front of the party. Basically I just need the proper syntax for a script that lets me spawn an edited item AND put it at coordinates/container at the same time. This seems like an easy question but I've been tinkering for hours and can't get it right.
Let's assume your chest has id chest_1, try using:
Code: Select all
chest_1.surface:addItem(spawn("wanted_item"))
It might even work without spawn, but with existing item which has id (haven't tried that so I'm not sure):
Code: Select all
chest_1.surface:addItem("wanted_item_1")
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 11:10 am
by Matlock19
Thanks for your help blichew.
1. Edit: Wait no, that gives me the error " function arguments expected near '=' "
2. I have not, and don't know what that does.
4. What I really need to know is how to define an edited item in a script by itself, so that I can call on it later for spawning or placing in containers. Like how do I create a cloned edited item without also immediately spawning one?
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 6:50 pm
by cameronC
Matlock19 wrote:Thanks for your help blichew.
1. Edit: Wait no, that gives me the error " function arguments expected near '=' "
try:
Code: Select all
skeleton_commander_1.monster:setLootDrop({percentchancetodrop, itemtodrop, percentchancetodrop1, itemtodrop2, })
2. I have not, and don't know what that does.
I don't think setDescription changes the displaying of modifiers like that. I would -guess- you setResistCold(nil)?
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 8:56 pm
by jxjxjf
Is there still room here for simple questions?
Anyone know how the dialogue in the Lindworm fight atop the castle was done? Not necessarily the triggers, just what function was used to display the text to the screen like that? It looks like maybe GraphicsContext is the answer(?), but I'm not sure how you access that outside of the onDraw hooks...
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 8:59 pm
by cameronC
jxjxjf wrote:Is there still room here for simple questions?
Anyone know how the dialogue in the Lindworm fight atop the castle was done? Not necessarily the triggers, just what function was used to display the text to the screen like that? It looks like maybe GraphicsContext is the answer(?), but I'm not sure how you access that outside of the onDraw hooks...
do you just mean:
?
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 9:04 pm
by jxjxjf
@cameronC: No, in the Lindworm fight, text is written in a larger font in the center of the screen as dialog. I've tried things like GameMode.showImage(), but that's definitely not how it was done. I was expecting some kind of alternative to hudPrint(), but it doesn't seem like that exists. Was curious if anyone had replicated that effect.
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 10:45 pm
by 5angel
How do I make a correct multi-floor castle level? The walls on another floor appear to be too [damn] high.
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 11:23 pm
by Decayer
5angel wrote:How do I make a correct multi-floor castle level? The walls on another floor appear to be too [damn] high.
Edit the map properties and set module height to 4.
Re: Ask a simple question, get a simple answer
Posted: Fri Nov 07, 2014 11:48 pm
by jxjxjf
Well, I have another one for you all. Has anyone found a way to trigger an event when a projectile passes THROUGH a tile?
If I disable projectilecollider on a wall_trigger it doesn't trigger anything. Can't seem to think of a way to do this. Teleporters trigger without stopping a projectile, so I must be missing how they do that. Any suggestions?
Re: Ask a simple question, get a simple answer
Posted: Sat Nov 08, 2014 12:33 am
by 5angel
Decayer wrote:5angel wrote:How do I make a correct multi-floor castle level? The walls on another floor appear to be too [damn] high.
Edit the map properties and set module height to 4.
wat
It works.
Is there's some twisted logic behind this?