Kcee wrote:Sorry I didn't post any screenshot, I couldn't convert it to PNG format.
Kcee wrote:Can someone help me out here???
Kcee wrote:I got my actor to shoot the plasma gun when facing right but not left. Download the game file.
if(cg_pgun>=25)
if(rdir==0)
{
CreateActor("p_bullet", "plasma_ball", "(none)", "(none)", 20, -7, false);
}
cg_pgun=0; //<--------------- after this (cg_pgun>=25) will never be true
if(cg_pgun>=25)
if(rdir==1)
{
CreateActor("p_bullet", "plasma_ball", "(none)", "(none)", 20, -7, false);
}
Kcee wrote:Can someone help me out with this?
At the beginning of the game, the player types in his name and later on in the game, an NPC would talk to the player and I want him to mention the player's name.
// The first argument "text" defines what string you want to scan.
// We want to scan the contents of the text box actor's text,
// so if we are in an event of that actor, that would be "text"
// (which is equal to "myTextInputActor.text", if that's the name of the actor).
// The second argument is the formatting used for reading.
// As we only want to read a string from the text, the formatting is simply "%s",
// which stands for string.
// The third argument is the pointer (i.e. the memory address) to the string where
// we want to store the result of the scan. As we want to read it to our variable, just
// input the name of the variable, preceded by "&", which is the "address-of" operator.
sscanf(text, "%s", &myName);
sscanf(text, "%s", &myName);
Users browsing this forum: No registered users and 1 guest