|
|
Malfunction W1340
#458950
04/09/16 10:18
04/09/16 10:18
|
Joined: Jun 2010
Posts: 590 California
Ruben
OP
User
|
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).
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.
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:
Malfunction W1340
Not enough entities reserved (1000)
OK Cancel
I tried setting 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
Serious User
|
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
Expert
|
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
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|