Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Malfunction W1340 #458950
04/09/16 10:18
04/09/16 10:18
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
I have it so that if the player gets within a certain distance of a wizard, the game will take over auto-pilot, and automatically move the player to a certain position (while restricting the player's ability to move the player), then rotate the player to face a wizard performing a spell by waving his arms (again, restricting the player's ability to move the player).

Code:
void wizardPortal()
{ 
   wizPortal = ent_create ( "DDoorsBright.mdl", vector(476, 
      -254, 2498), lair_from_wizRoom_a ); // magic portal
      //    created by wizard spell.
}

if (my.status == wiz_unaware) // hanging around?
{
   if(wizSneakDone == 0)
   {
      if((hero.z >= 2397) && (hero.y > 300))
      {
         my.status = snkOnWiz; // once player gets within
            //    certain distance of wizard, game
            //    automatically moves player to certain 
            //    location.
      }	
   }
}



After the wizard waves his arms a couple times, a magic portal door appears. After the magic portal appears, then the player is able to move about freely.

Code:
if(my.status == snkOnWiz)
{
   free2MoveFreely = 0; // player control is restricted
						
   ent_moveto(hero, vector(-179, 581, 2458), 5); 
      // game automatically moves player to certain location
						
   wait_for_my(ent_moveto);
						
   free2MoveFreely = 2;
						
   ent_turnto(hero,vector(-59,0,0),5); // once player is
      //    automatically moved to the certain location, game
      //    automatically rotates player toward certain 
      //    direction, facing the wizard

   wait_for_my(ent_turnto);
					
   my.ANIMATION += 2*time_step;
			
   ent_animate(me,"ritual",my.ANIMATION,ANM_CYCLE);

   if(my.ANIMATION > 200) // if wizard waves his arms a couple
                          //    times?
   {
      ent_animate(me,NULL,0,0); // stop wizard waving arms
				
      my.status = open_portal;
   }
}

if(my.status == open_portal)
{
   wizardPortal(); // run this function, which creates a .mdl
      model in the location given in this function.
      	
   free2MoveFreely = 1; // Player can now be moved freely
                        //    again.
}



After awhile after the magic portal appears, I keep getting a pop-up error that states:

Code:
Malfunction W1340
Not enough entities reserved (1000)
OK            Cancel



I tried setting
Code:
max_entities = 5000


before loading the current .wmb file. When I do that, it takes longer for the same pop-up error to show up, with one difference. There is a "5000" in place of the "1000" before.

Does anyone know what I may be doing wrong in getting this error?

Re: Malfunction W1340 [Re: Ruben] #458951
04/09/16 10:43
04/09/16 10:43
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
check the diag window through f11 to check how many entities there are, chances are you have some function that creates entities in some loop.

Last edited by Reconnoiter; 04/09/16 10:43.
Re: Malfunction W1340 [Re: Reconnoiter] #458956
04/09/16 15:06
04/09/16 15:06
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
I believe that function is going to be `wizardPortal()`, because the state machine sets the state to open_portal and then leaves it there, spamming the world full of portals.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: Malfunction W1340 [Re: WretchedSid] #458959
04/11/16 00:10
04/11/16 00:10
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Thank you Roconnoiter and WretchedSid. You were both right. The f11 showed me that a bunch of portals were being spammed into the world. I fixed it. Thank you.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1