Programmer-in-training
Gender: Male
Location: Ireland
Rank: Suspect
Joined: Tue Jan 27, 2009 7:02 pm
Posts: 28
Sorry about the thread necromancy, but I could really use some help and because this is a sticky I figured it would be OK.
This is the problem:

I use the CRO and the sprites appear above where they should. What am I doing wrong?
Here is the code, in case that will help:
Code:
#include(pwlib/pwlib.hlsl)
[game]
jumptoscript("setup");
[setup]
runscript("pw_initpwlib");
runscript("pw_initpwbgs");
runscript("charcreation");
runscript("load");
runscript("evidenceprofilecreation");
changetitle("PWLib Tutorial Game");
jumptoscript("run");
[load]
loadtexture(80900,"PW/evidence/gun.png");
loadtexture(80901,"PW/evidence/lawyer badge.png");
loadtexture(80902,"PW/evidence/photo.png");
loadtexture(90900,"PW/profile/ema.png");
loadtexture(70000,"cust/trucygs4.jpg");
loadtexture(70010,"PW/misc/pwdefaulttitle.png");
loadtexture(90001,"PW/profile/minuki.png");
loadtexture(7001,"PW/CRO/CROJudge.png");
loadtexture(7002,"PW/CRO/CROPrPayne.png");
loadtexture(7003,"PW/CRO/CRODfPhoenix.png");
loadtexture(7000,"PW/misc/totaltransparent.png");
[charcreation]
runscript("pw_createema");
runscript("pw_createtrucy");
runscript("pw_createjudge");
runscript("pw_createphoenix");
runscript("pw_createpayne");
[evidenceprofilecreation]
setvar([evidencenumber],900);
setvar([evidencegfs],80901);
setvar([evidencegfl],80901);
setvar([evidencesup],0);
setvar([evidencename],"Attorney's Badge");
setvar([evidencesdesc],"Type: Other\n One of my possessions.");
setvar([evidenceldesc],"It's my all important badge.\nIt shows that I'm a defense attorney.");
runscript("createevidence");
setvar([evidencenumber],901);
setvar([evidencegfs],80900);
setvar([evidencegfl],80900);
setvar([evidencesup],0);
setvar([evidencename],"Gun");
setvar([evidencesdesc],"Type: Other\n One of my possessions.");
setvar([evidenceldesc],"My new gun.\nCarried since Von Karma used\na Stun Gun on me.");
runscript("createevidence");
setvar([evidencenumber],902);
setvar([evidencegfs],80902);
setvar([evidencegfl],80902);
setvar([evidencesup],1);
setvar([evidencename],"Magic Show Flyer");
setvar([evidencesdesc],"Type: Photo\nReceived from Trucy.");
setvar([evidenceldesc],"A flyer for a club called\n\"The Magic Bar\".\nFeatures Trucy as the main attraction.");
runscript("createevidence"); setvar([evidencestex],7000);
runscript("setevidencepagesimple");
setvar([profilenumber],800);
setvar([profilegfs],90900);
setvar([profilegfl],90900);
setvar([profilename],"Ema Skye");
setvar([profilesdesc],"Age: 19\nGender: Female");
setvar([profileldesc],"An energetic girl that wants to be a \nforensic detective.");
runscript("createprofile");
setvar([profilenumber],801);
setvar([profilegfs],90001);
setvar([profilegfl],90001);
setvar([profilesdesc],"Age: 15\nGender: Female");
setvar([profileldesc],"A cheerful magician girl.");
runscript("createprofile");
[run]
setbg(70010);
runscript("pw_showmain");
waitresponse();
runscript("pw_hidemain");
jumptoscript("casestart");
[casestart]
setvar([evidencenumber],900);
runscript("addevidence");
setvar([evidencenumber],901);
runscript("addevidence");
setvar([profilenumber],800);
runscript("addprofile");
setvar([profilenumber],801);
runscript("addprofile");
jumptoscript("prescene1");
[prescene1]
runscript("pw_showadvarrowmenu");
runscript("pw_useblackbg");
runscript("pw_showmessagebox");
runscript("pw_setnameboxtonoone");
setmsgboxtextcolor(255,0,255,0);
messageauto("June 6, 12:34 PM");
wait(6);
messageappendauto("\nCourt House");
wait(6);
messageappend("\nDefendant's Lobby No. 2");
wait(6);
setmsgboxtextcolor(255,255,255,255);
jumptoscript("enterscene1");
[enterscene1]
runscript("pw_allowsaving");
runscript("pw_usepwbgcourthall");
loadandplaymp3("sounds/02 - Courtroom Lounge ~ Beginning Prelude.mp3",0,"N");
jumptoscript("scene1");
[scene1]
runscript("setlipsynctochar");
runscript("showpwchar");
runscript("pw_showmessagebox");
runscript("pw_enableemanormal");
runscript("pw_setnameboxtoema");
message("Oh, hello.");
message("My name is Ema Skye!");
runscript("pw_setnameboxtotrucy");
runscript("pw_enabletrucynormal");
message("Oh hello. My name is Trucy.");
message("I'm a magician.");
message("Here, take a flyer!");
setvar([evidencenumber],902);
runscript("addevidence");
setvar([pw_headeviaddmsg],"");
setvar([pw_taileviaddmsg]," was added \nto the Court Record.");
runscript("pw_startevidenceadd");
runscript("setlipsynctochar");
runscript("pw_enableemanormal");
runscript("pw_setnameboxtoema");
message("Magic? Pfft! \nMagic dosn't exist!");
runscript("pw_setnameboxtotrucy");
runscript("pw_enabletrucymad");
message("Does too!");
runscript("pw_enableemamad");
runscript("pw_setnameboxtoema");
message("Does not!");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
message("(There is no way I am \ngetting involved \nin this one!)");
runscript("setlipsynctochar");
runscript("pw_enableemanormal");
runscript("pw_setnameboxtoema");
message("Mr Lawyer! What do \nyou think?");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
message("(Damn!)");
jumptoscript("presenttrucyevidence");
[presenttrucyevidence]
definevar([signal],"int");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtonoone");
messageauto("(Show what proves that Trucy is\na magician!)");
setvar([pwonetypepresent],1);
runscript("pw_forcepresent");
waitsignal("advance",[signal]);
runscript("pw_hidemessagebox");
loadandplaysfx("01_Phoenix - takethat.wav",0);
runscript("pw_raisetakethat");
wait(6);
if(<compare([currentitemcode],"equal",902)>,<jumptoscript("presenttrucyevidencecorrect")>,<jumptoscript("presenttrucyevidencewrong")>);
[presenttrucyevidencecorrect]
runscript("pw_showmessagebox");
runscript("pw_enableemanormal");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
message("Take a look at this...");
runscript("pw_setnameboxtoema");
runscript("pw_enableemaunsure");
runscript("setlipsynctochar");
message("Oh!...\nI guess she is a magician...");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
message("Alright, enough of this tutorial stuff. \nIt's time for COURT!");
jumptoscript("prescene2");
[presenttrucyevidencewrong]
runscript("pw_showmessagebox");
runscript("pw_enableemanormal");
runscript("pw_setnameboxtoema");
runscript("setlipsynctochar");
message("Umm... Nope!\nTry again!");
jumptoscript("presenttrucyevidence");
[prescene2]
stopmp3(0);
runscript("pw_showadvarrowmenu");
runscript("pw_useblackbg");
runscript("pw_showmessagebox");
runscript("pw_setnameboxtonoone");
placefade("pw_char","char",0,"O");
setmsgboxtextcolor(255,0,255,0);
messageauto("June 6, 12:57 PM");
wait(6);
messageappendauto("\nCourt House");
wait(6);
messageappend("\nCourtroom No. 7");
wait(6);
setmsgboxtextcolor(255,255,255,255);
jumptoscript("enterscene2");
[enterscene2]
loadandplaymp3("sounds/03 - Ace Attorney ~ Court Begins.mp3",0,"N");
setgenobjgraphic("pw_crowitness",7000);
setgenobjgraphic("pw_crojudge",7001);
setgenobjgraphic("pw_croprosecutor",7002);
setgenobjgraphic("pw_croattorney",7003);
jumptoscript("scene2");
[scene2]
runscript("pw_hidemessagebox");
runscript("pw_showgavelhit");
runscript("setlipsynctochar");
runscript("pw_showjudgetable");
runscript("pw_enablejudgenormal");
placefade("pw_char","char",0,"I");
runscript("pw_setnameboxtojudge");
runscript("pw_showmessagebox");
message("Court is now in session!");
runscript("pw_initcroverview");
runscript("pw_hidemessagebox");
runscript("pw_showcourtroomoverview");
message("Unfortunatly, there was no\ncrime, so we have nothing \nto talk about.");
runscript("pw_hidecourtroomoverview");
runscript("pw_showattorneystand");
runscript("pw_enablephoenixsweating");
runscript("setlipsynctonoone");
runscript("pw_setnameboxtophoenix");
message("(Then why are we here?)");
runscript("pw_enablephoenixthinking");
messageauto("(Wait a minute...)");
wait(40);
runscript("setlipsynctochar");
messageappend("\nThat's it!");
runscript("pw_enablephoenixdeskslam");
messageauto("Your Honor...");
wait(20);
runscript("pw_initspeedlines");
runscript("pw_hidecourtbench");
runscript("pw_showspeedlines");
runscript("pw_enablephoenixzoom");
loadandplaymp3("sounds/06 - Phoenix Wright ~ Objection! 2001.mp3",0,"N");
messageappend("\nI have something we can argue about!");
runscript("pw_showprosecutorstand");
runscript("pw_enablepayneexplain");
runscript("pw_setnameboxtopayne");
message("Ridiculous!");
message("What could you possibly have prepared\non such short notice,\n Mr. Wright?");
setvar([pw_evidtoshowinbox],80902);
runscript("pw_showattorneystand");
runscript("pw_enablephoenixevidence");
runscript("pw_setnameboxtophoenix");
runscript("pw_showflyingevidboxright");
message("Your Honor, take a look\nat this, please.");
runscript("pw_showjudgetable");
runscript("pw_enablejudgesurprised");
runscript("pw_setnameboxtojudge");
message("What is this?\nA flyer for a magic show?");
runscript("pw_hideflyingevidboxright");
runscript("pw_showattorneystand");
runscript("pw_enablephoenixconfirm");
runscript("pw_setnameboxtophoenix");
message("Correct.");
message("I recieved that in the lobby. \nA magician girl was handing them out.");
runscript("pw_enablephoenixdeskslam");
messageauto("Just as I left, a fight broke out\nbetween her and another girl over...");
wait(10);
runscript("pw_hidecourtbench");
runscript("pw_showspeedlines");
runscript("pw_enablephoenixzoom");
messageappend("\nThe existance of Magic!");
loadandplaysfx("01_Payne - Objection.wav",0);
runscript("pw_raiseobjection");
setvar([sld_targetcharanim],"pw_enablepayneexplain");
runscript("pw_slideattoneytoprosecutor");
runscript("pw_setnameboxtopayne");
message("Mr. Wright, no court of law will\never accept the existance of Magic!");
loadandplaysfx("Phoenix - Objection.mp3",0);
runscript("pw_raiseobjection");
setvar([sld_targetcharanim],"pw_enablephoenixcertain");
runscript("pw_slideprosecutortoattoney");
runscript("pw_setnameboxtophoenix");
message("Don't be so sure!");
runscript("pw_enablephoenixdeskslam");
message("This court has already accepted the\nexistance of Spirit Chanelling!");