Verse Library verse

01 Fragment

Configures item granting, ammo, and creature spawner range for island startup.

verse-library/set-up-the-basic-gameplay/01-fragment.verse

# This is our main script. It runs when the game starts.
# Think of it as the "Start Button" for your code.
Begin Play(): void =
    # Step 1: Give players a weapon.
    # We tell the Item Granter to work right away.
    ItemGranter.GrantOnGameStart = true
    
    # Step 2: Make sure the weapon has lots of ammo.
    # 999 is a big number. It means "never run out!"
    ItemGranter.SpareWeaponAmmo = 999
    
    # Step 3: Set up the monster.
    # We tell the Creature Spawner to wait near the player.
    CreatureSpawner.ActivationRange = 3.0
    
    # Step 4: Print a message to the screen.
    # This helps us know the code is working.
    print("Game is ready! Fight the Fiend!")

Comments

    Sign in to vote, comment, or suggest an edit. Sign in