Jump to content
  • 0

Crafting Station Sprite


trollface

Question

I've been messing with crafting, and I've run into an issue.

I want the player to be able to click on a sprite (an anvil) to craft items. The issue is, that every time I use an action, I pick the anvil up, and I can click it in my inventory to bring up the crafting option.

Is it possible to do the following;

Have an item (sprite of an anvil) be able to be picked up and dropped by the player without crafting occurring AND have the player able to click on the anvil ONLY on the map to bring crafting up?

Basically, I want players to be able to decorate their property with items, and be able to click the items to execute crafting on the map and NOT in their inventory. 

I'm still messing with events, so hopefully I can figure this out.

- edit -

My problem is that I'm unable to find a command to trigger an event with a sprite on the map. I don't want to create a map based event. I want to create an interactable event within a sprite that you can pick up also. Right now, I can only activate the event once it's in my inventory, but not on the map.

I have the item, an anvil, set as an Event. 
 

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

It's possible to do everything that you mentionned with common event and such but, i strongly advice against using dropped item to decorate since they will disapear after a timer. Even if you supress the timer im not sure it's a good idea at all since I'm note sure if an item will stay forever on the map if there is a bug or a server restart.

 

If you want the player to be able to "decorate" you can have "fixed decoration event" in his home and make him able to choose beetween different decorations (Maybe having the Anvil item in the inventory to decorate with an anvil is a more reasonable solution). And since you don't want the player to be able to use the anvil outside of his home it would be good.

Link to comment
Share on other sites

  • 0

Oh... This engine doesn't allow for permanent changes to the server, say building a house or changing tile sprites? 

Does anyone know more about this? If the server restarts, why would any changes by the players revert? 

- edit -

I get what you are saying. Changes can be made, but only through events? Hmmmm... 

Link to comment
Share on other sites

  • 0

Technically you can do permanent change but you need to play with variables and event.

Also another things with events, they are player binded (Or not if you check the case "common event"), that does mean that if there's no variable changes, things could stay the same. I mean, let's say that you make an event to "put" an anvil in a house.

 

Imagine the event like this

Page 1

Conditions : None

                 -> Option  Would you like to put an anvil ? 

                     - Opt 1 Yes

                             Conditional Verify if the player got an anvil 

                                If yes : 

                                           -Take items Anvil

                                            - Change player variable House1Anvil to Yes (If you don't make a variable here  to make the change "permanent" the event will be "reset" each time the player disconnect and would loose his anvil )

                                if no : You don't have an anvil

                                            Exit event

                     - Opt 2 No thanks.

                                            - exit event

 

Page 2

Conditions House1Anvil is Yes

                             -> Option  What do you want to do ?

                             -Opt 1 : Craft something

                             -Opt 2 : Retrieve the anvil for something else

                             -Opt 3 : Nothing

 

Also if another player get inside this house, since it's a player variable he wouldn't be able to see the Anvil, if you want other player to see the anvil it would need to be a Common Variable.

Link to comment
Share on other sites

  • 0

The issue I'm coming across is simply that when I interact with the anvil on the map, nothing happens. I must be using the wrong commands. I can only open the crafting menu when the anvil is in my inventory. I simply don't konw the condition/trigger to open a crafting menu while the anvil is on the map.

- edit -

"Conditions House1Anvil is Yes"

Is that the condition/trigger? What is that, a player switch?

 

- edit -

The more I dive into the intersect engine, the less I see the possibility of players just clicking sprites to change them outside of events.

If I am going to make the ground farmable, do I need to create an event for the sprite (grass), and if the player has a Rake equipped, he can click the grass and turn it into dirt? All this is done through events? 

Link to comment
Share on other sites

  • 0

Yeah... That is done by using the map events. I was trying to tie the event to a sprite.

I think I've been going about this all wrong. I've been treating the source code and events as two competing tools. Events are shorthand automatic code.

Instead of allowing players the 'freedom' to manipulate the game, everything will have to pre scripted and anchored to spots on the map. So instead of choosing where a player builds a house, I have to pre choose the spot for them, same for all the elements inside the house. You can decorate a wall, but ONLY in certain spots, not anywhere you choose.

My game is going to pretty much have thousands of events then!

Thank you very much. 

 

Link to comment
Share on other sites

  • 0

I got it to work. I can now craft an anvil, use it to craft other items, pick it up off the map and carry it in my inventory.

After I place the anvil it stays in place after server reset. 

Down the line I can hire a coder to mess with the source so players can manipulate tile sprites so they can place the anvil anywhere, but for now, this is just fine using the map event system.

Thank you all for your patience in helping me!

Link to comment
Share on other sites

  • 0
3 hours ago, trollface said:

My game is going to pretty much have thousands of events then!

This is not a very good idea, you should not abuse the events since they consume many resources, the housing issue I thought to do with events and in a simple way it could be achieved but on a large scale depending on the number of houses available and the amount of customization It will not be a good option, for this type of changes the best thing would be to make changes in the source code, the events are good for some things but I do not see them solid enough to make great systems with them.

Link to comment
Share on other sites

  • 0
13 hours ago, Blinkuz said:

This is not a very good idea, you should not abuse the events since they consume many resources, the housing issue I thought to do with events and in a simple way it could be achieved but on a large scale depending on the number of houses available and the amount of customization It will not be a good option, for this type of changes the best thing would be to make changes in the source code, the events are good for some things but I do not see them solid enough to make great systems with them.

As long as they are not on Autorun without conditional (Meaning they would run permanently in loop) i think it's okay to have a lot of event, since they are not launched all at the same time.

 

But for a "Big" Housing item, i agree that source would be better, but if you do like only 20 or so houses and they are very very costy, well it's manageable.

Link to comment
Share on other sites

  • 0

Fair enough guys. For housing, they're going to be pre-generated on their own Maps with warp tiles which can only be activated by players with a key or some other trigger.

 

So I can have dozens and dozens of player homes on their own Maps without the need to use events to create homes or anything. Instanced housing as they call it

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...