JohnPony Posted February 20, 2014 Author Share Posted February 20, 2014 To further exemplify the potential of the scripting system, I have created a NPC from a script file that appears in game (the green eye-like thing):![](http://i.imgur.com/N46JsBI.png)And the script code:```/* Copyright (C) KAO Interactive, Inc - All Rights Reserved * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * Written by John Lamontagne , Feburary 2014 */using Dungeon_Crawler_Utilities;using Dungeon_Scripting_Interface;using Dungeon_EventDispatcher;namespace Dungeon_Crawler_Client.World.Entities.Npcs{ // This script will add a strange eye monster to our dungeons. public class StrangeEyeScript : IScript { public StrangeEyeScript() { // Empty constructor; we don't need to put anything here at the moment. } // This property lets the script manager know exactly what event this script is going to be binded to. // Im our case, it's the playerMoved event. public string EventName { get { return "dungeonGenerated"; } } // This is the entry point for our script. // This is called whenever the event that our script is binded to is raised. // An object which implements IEventDispatcherArgs is passed in as an argument. // This particular script should know exactly what this object provides. public void Execute(IEventDispatcherArgs eventArgs) { dynamic dungeonEventArgs = (dynamic)eventArgs; dungeonEventArgs.Dungeon.SpawnNpc(new StrangeEye(), new IntVector(10, 10)); } } public class StrangeEye : INpc { public string TextureName { get; set; } public Transform Transform { get; set; } public string Name { get; set; } public float Speed { get; set; } public int Level { get; set; } public StrangeEye() { this.Name = "Strange Eye"; this.TextureName = "charNewteye"; this.Level = 5; this.Speed = .2f; } }} ``` Link to comment Share on other sites More sharing options...
JohnPony Posted February 23, 2014 Author Share Posted February 23, 2014 Alpha testing will begin in a few weeks.Sign up early to get your free key! All alpha testers will receive free content points when the game is released!Please sign up for alpha testing here:[http://www.godsoul.kaointeractive.com/forumdisplay.php?fid=4](http://www.godsoul.kaointeractive.com/forumdisplay.php?fid=4) Link to comment Share on other sites More sharing options...
SkywardRiver Posted February 23, 2014 Share Posted February 23, 2014 I will be there! Link to comment Share on other sites More sharing options...
JohnPony Posted February 23, 2014 Author Share Posted February 23, 2014 > I will be there!Thanks for the support. :) Link to comment Share on other sites More sharing options...
JohnPony Posted March 9, 2014 Author Share Posted March 9, 2014 This game project is now open source![https://github.com/JohnLamontagne/GSDK](https://github.com/JohnLamontagne/GSDK "External link")Contribute and enjoy. Link to comment Share on other sites More sharing options...
SkywardRiver Posted March 10, 2014 Share Posted March 10, 2014 What happened?! Link to comment Share on other sites More sharing options...
JohnPony Posted March 10, 2014 Author Share Posted March 10, 2014 > What happened?!Murdoc quit. Link to comment Share on other sites More sharing options...
JohnPony Posted March 13, 2014 Author Share Posted March 13, 2014 Decoupled the SceneManager/GameScene/MenuScene from the SFML rendering implementation details.Also added the ability to control dialogue text speed in the dialogue files.For example:```[Character Transition Time: 50][Part 1]Example dialogue...[Part 2];)[End]```As I said before, the project is now open source, which allows for collaboration. Anyone can contribute; this can be through the means of assets (art, music, sfx, etc.), or code. Link to comment Share on other sites More sharing options...
JohnPony Posted March 14, 2014 Author Share Posted March 14, 2014 Fixed a bug where textures weren't being properly unloaded upon program termination. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now