Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just a quick simple question!
RainbowDash Offline
Junior Member

Posts: 15
Threads: 3
Joined: Sep 2011
Reputation: 0
#3
RE: Just a quick simple question!

As I'm new to the language, how exactly would I set this up in my code?
////////////////////////////// Run first time starting mapvoid
OnStart()
{      
GiveItemFromFile("lantern", "lantern.ent");        
for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");        
AddEntityCollideCallback("Player", "PlayerCollide", "GruntBegin", true, 1);
}
////////////////////////////// Run when entering mapvoid
OnEnter()
{
}
////////////////////////////// Run when leaving mapvoid
OnLeave()
{
}

void GruntBegin(string &in asParent, string &in asChild, int alState)
{    
SetEntityActive("servant_grunt_1", true);     
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1, "");    
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");    
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 4, "2");    
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");    
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3, "2");
}

This is just what I threw together from reading some tuts, I understand the commands and what not...

I'm going to have to assume, in this engine, the level script file is constantly looping? I'm actually used to actionscript, nothing to flashy, so I'm not exactly at home when it comes to C variants... (I'm taking them up shortly though, this could give me a head start ^_^)
How exactly would I go about checking if the player died, going about respawning the monster, and all that jazz. o.o?
I hate asking for people to DO my code for me, but I guess to start I need things to thoroughly examine and study before creating my own ^_^
(This post was last modified: 09-17-2011, 12:46 AM by RainbowDash.)
09-17-2011, 12:45 AM
Find


Messages In This Thread
Just a quick simple question! - by RainbowDash - 09-17-2011, 12:32 AM
RE: Just a quick simple question! - by Khyrpa - 09-17-2011, 12:39 AM
RE: Just a quick simple question! - by RainbowDash - 09-17-2011, 12:45 AM
RE: Just a quick simple question! - by Khyrpa - 09-17-2011, 09:25 AM
RE: Just a quick simple question! - by Khyrpa - 09-17-2011, 04:57 PM



Users browsing this thread: 1 Guest(s)