Skip to content

Instantly share code, notes, and snippets.

@jakevsrobots
jakevsrobots / PickUpObject.cs
Last active July 10, 2021 00:13
Script for picking up objects in Unity.
using UnityEngine;
using System.Collections;
public class PickUpObject : MonoBehaviour {
public Transform player;
public float throwForce = 10;
bool hasPlayer = false;
bool beingCarried = false;
void OnTriggerEnter(Collider other)

This is the roog code:

who lives here?
- '@' is for you
- '*' is for [lightning bug]

what are the floors?
- '.' is for [swamp floor]
- 'o' is for [cloudy water]
@jakevsrobots
jakevsrobots / SharecartOneThousand.cs
Last active September 3, 2019 19:05
A helper script to read/write SHARECART1000 save files. See http://sharecart1000.com/ for more info!
/*************************************************
SHARECART1000 helper script:
This script reads/writes data according to the
shared savegame file specified here:
http://sharecart1000.com/
Put this script on some game object in your
scene. You can use a sample text file in the
sharecart format and assign it to the property
@jakevsrobots
jakevsrobots / inksyntax.vim
Created February 3, 2019 11:59
Vim syntax highlighting for Ink scripts
" ink syntax file
if exists('b:current_syntax') | finish| endif
syntax match Bullet "[\*\+]"
syntax match OutputBracket "[\[\]]"
syntax match Option "\s?[\*\+].*" contains=Bullet,OutputBracket
syntax match Knot "^===.*"
syntax match Divert "-> [^ ]*"
@jakevsrobots
jakevsrobots / equus_oils_joseph_first_draft.txt
Created January 27, 2019 15:58
Super early first draft of the first conversation in Kentucky Route Zero
[intro]
JOSEPH: It ain't dark yet, but it ain't light, my friend! I heard a truck full of cans - I dunno - soup cans? Beer? I dunno, but I heard that truck bounce off a possum or something and spill juice and metal all over the sixty-five just a hundred-fifty yards out, maybe thirty, thirty-five minutes ago! Did you hit that on the way along?
*CONWAY: I thought it was oil.(intro-oil)
*CONWAY: I thought it was rain.(intro-rain)
[intro-oil]
JOSEPH: Sure, sure. You're a driver! Oil on your mind. Well, mine too, as you can imagine.[intro-camefrom]
[intro-rain]
:: intro
''MAYA'': I'm not late, am I?
[[This must be our guest.->guest]]
[[Maybe she's delivering a video.->video-delivery]]
[[Who is this person.->who-is-this]]
:: guest
''EMILY'': Oh, hi! You must be, um ...
:: intro
''JUNEBUG'': How's everybody doing? Anybody had a real bad night?
''JUNEBUG'': //(To CONWAY)// How about you, old man?
<<choice "not-bad" "CONWAY: Not too bad.">>
<<choice "real-bad" "CONWAY: Yeah, real bad.">>
:: not-bad
[intro]
JOSEPH: It ain't dark yet, but it ain't light, my friend! I heard a truck full of
cans - I dunno - soup cans? Beer? I dunno, but I heard that truck bounce off a
possum or something and spill juice and metal all over the sixty-five just a
hundred-fifty yards out, maybe thirty, thirty-five minutes ago! Did you hit that
on the way along?
*CONWAY: I thought it was oil.(intro-oil)
*CONWAY: I thought it was rain.(intro-rain)
<scene name="root">
<line>
$[player_name], it seems you have something on your mind.
<option goto="doYouHaveAnyCloth">Do you have any spare bits of cloth?</option>
<option goto="howDidYouGetHere">How did you get here?</option>
<option goto="aboutSilas">Let's talk about Silas.</option>
<option goto="howToGetBack">I think I'd like to leave the moon now.</option>
</line>
</scene>
<scene name="init">
<goto sceneName="intro" condition="!met_b" />
<goto sceneName="root" />
</scene>
<scene name="intro" goto="root">
<setGameVar name="met_b" value="true" />
<line>Hello. Did you land in that balloon? Nice looking thing.</line>
<line>Wish I had a balloon. Oh, I'd probably just ruin it. I suppose they know how to do things properly $[player_came_from].</line>