Submissions by saluk tagged dragging

A submission for Make games. 53

Hooked up a generic event trigger to item interactions. Now I can listen for people doing things with items. I then made an event where trying to take down the tent makes the field guide annoyed and he comes over to stop you. I thought of actually adding in logic that allows the event response prevent the action from happening, so that if you try to take down the tent with the guide around he actually wont let you. But I thought of a better idea - taking down the tent becomes a task (an action that happens over time), and the drag response I've talked about in prior updates will automatically cancel any running tasks on the target of the drag. So what happens, is you start taking down the tent and see the progress bar, but if he reaches you before you finish, the action wont complete as he drags you away kicking and screaming.

Easier to code, and better for gameplay. You can now judge how long unappreciated tasks take and see if you can complete them before you are thwarted.

Events.json to accomplish this behavior:

{"type":"action","action":"dismantle","npc":"erik","repeat":1,"result":[
["drag_to",{"npc":"trask","target":"erik","location":"away_from_tent"}]
]}

The location of the drag has to be pre-set which is kind of annoying, but I will probably have simple enough scenes to just hard code all of the spots you get pushed to. Later on I can have the guards drag you to a jail cell haha.

Sadly, some of the "improvements" to pathing have made the npcs really bad at it again for some reason. I HATE PATHING! No gif, because I have to set up just the right scenario for the npc to get to me in time to prevent me from taking down the tent :/