Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - proskiier

#1
i found code for arcade style (arrow keys) movement and i think it was from an old version

i had to rework some of the code i found and i got some help from the help file, but it still giving me a "(" error and ive checked all the counting of ( and {

i hope its not some dumb fix so I don't feel stupid but if anyone could help me out would be great

btw its in the function on_key_press(int keycode) in the global script

Code: ags

if (keycode==372) { // up arrow
    character[EGO].WalkStraight(player.x, player.y-200);    
		while ((IsKeyPressed(372)>0) && (character[EGO].WalkStraight)) Wait(1); 
    StopMoving(EGO);
}
if (keycode==375) { // left arrow
    character[EGO].WalkStraight(player.x, player.x-200, player.y);
    while ((IsKeyPressed(375)>0) && (character[EGO].WalkStraight)) Wait(1);
    StopMoving(EGO);
}
if (keycode==377) { // right arrow
    character[EGO].WalkStraight(player.x, player.x+200, player.y);
    while ((IsKeyPressed(377)>0) && (character[EGO].WalkStraight)) Wait(1);
    StopMoving(EGO);
}
if (keycode==380) { // down arrow
    character[EGO].WalkStraight(player.x, player.x, player.y+200);
    while ((IsKeyPressed(380)>0) && (character[EGO].WalkStraight)) Wait(1);
    StopMoving(EGO);
}


thanks alot guys/gals in advance :)
#2
I checked around the help files for some help with my issue and i kinda think i need a global variable but am not so sure how to do it...


I have a character who when you talk to him will need to say/do different things depending on a hotspot in the room he is located in.

Code: ags

function character17_a() {
  // script for Character 17 (Sad Tree): Talk to character

if (fixarm == false) {
cSadtree.Say ("One of the bushes in crazy town stole my brother's arm.");
cSadtree.Say ("Go find his arm and give it back to him and I will give you this egg I found.");
}
else {
cSadtree.Say ("Thanks for helping my brother.");
cSadtree.Say ("Here is your reward as I promised.");
object[0].Visible = false;
PlaySound(2);
cEgo.AddInventory(iEasterEggTv);
}  
}



his brother is a hotspot in the same room that he is in.
and here is his code

Code: ags

// room script file
bool fixarm = false;

#sectionstart hotspot1_a  // DO NOT EDIT OR REMOVE THIS LINE
function hotspot1_a() {
  // script for Hotspot 1 (Sad Tree): Use inventory on hotspot
  
if (cEgo.ActiveInventory == iBranch) {
Display ("You throw the branch to the tree and he puts it on himself.");
object[1].Visible = true;
cEgo.LoseInventory(iBranch);
fixarm = true;
} 
}
#sectionend hotspot1_a  // DO NOT EDIT OR REMOVE THIS LINE



My assumption is that the fixarm wont work on the character because it is only defined in the room code, even though the character is in the same room, so I'm kinda stuck on what to do here...


any help is greatly appreciated. Thanks guys.
#3




basically my first dialog has a person where you can guess their favorite color and if you get it right i wanted to give the player an inventory item



ive tried so many of the add inventory ways and it gives an error for all of them.

Please help me soon, this is driving me nuts!!!
#4
I have a TV character who looks like a tv but his second (number 1) loop is a newscast and i did it in the interaction editor and it works fine and dandy, looks neat too...




but i wanted to add maybe a few more short clips on a random basis... so i figured ide try to move it to one script action, in the interaction editor

at the bottom where it says "text script equivalent code" it isnt coming up with anything for those two lines.

sound obviously just would be Playsound(4); but I am not sure how to set it up with a few scenes random or in order...

thanks alot guys...

#5
Hey I was wondering if there is a way to have a room in which when you gain inventory items you can put them anywhere.

Ill explain a lot better for you all... my game is an adventure where you solve puzzles and mini games and each time you get an object like a tv or another item from your bedroom that was stolen from you and *scattered* among the lands...


I know that I could probably have a bunch of not visible versions in the room and hotspots and depending on which one they clicked it would place it there, but I really want them to be able to put them anywhere in the room and that would require me to make tons of those.  I also wanted to make it that they can pick them up by clicking them with the finger icon, which would bring up a gui asking if you want to move it (with yes/no buttons)....

my whole plan is at the end of the game for a screenshot to be taken so everyone has pictures of their different room layouts, because I think that would be neat.

So basically can anyone tell me if this is possible please. Thanks a ton in advance for any suggestions/code/help. :)
#6
I have the basic kings quest interface in my game, but the grey bar here to get the (icon bar) to show up when you mouse over it is too tall... so I changed it from 13 to a lower number and that worked well(with showing more of my maps) but when you scroll it still reads as 13 tall (as to when to switch over to the icon bar)

So basically my question is how do I switch it from 13 rollover to show up to a lesser number??

Thanks in advance :)

#7
I have sounds for whenever an item is picked up and it is not working... I have other sounds in my game and they all work except these

and i did the same exact thing... any ideas?

(in room 1): Sound sample load failure: cannot load sound 2

My file is named: SOUND2.wav and is in the right folder
#8
code:
  // script for Object 1: Talk to object
bool talkto = false;

if talkto == false then{
cStrangekid.Say ("I can't thank you enough for getting me out of that hole.");
cStrangekid.Say ("Here take this, I found it hidden in the hole, but you can have it.");
cEgo.AddInventory(iTv);
talkto = true;
else
cStrangekid.Say ("Thanks again man.");
talkto=false;
}
}

essentially you talk to the kid and if you have already talked to him, he says the second part in the if statement, and you cant get the tvs more than once
#9
Kinda basic question but every character font color is red...

how can i make different chars have different font colors??
#10
Ok I have this map with a fountain with a statue in the middle, on it



I am going to make this fish objects... (one at a time(and i will separate/shrink them)) and I want them to swim around in the water randomly

when they move behind the statue it will be ok cause I can do walkbehinds in the room menu, but how do i get them to randomly move

I know i will have to do this with scripting object
  • .move but is there a way to do it randomly??

    and do I do this in the room script since I always want them moving(swimming) around or in that always changing script??

    Thanks a bunch for the help, and let me know if you need any leet drawings made for you, as you can see my skills are top notch. :)
#11
i sent my sister the .exe and this is the error she got.... her computer is fairly new is there any easy fix besides messing with her drivers??

http://img89.imageshack.us/img89/7613/errorhd8.png
#12
  // script for Hotspot 1 (birdnest): Use inventory on hotspot
  if (cEgo.ActiveInventory == iEgg) {
  Display ("The mama bird drops you the key");
  cEgo.LoseInventory(iEgg);
  object[0].Visible = true;
  object[0].Move(134, 183, 4);
}


this code does not move the key(from the air 134,71) to the ground which is (134,183)

did i do something wrong?? it does everything up the the   object[0].Visible = true; (because I can see the key)

i tried adding eBlock so that I cant move until it drops but that did not work either... thanks for help in advance :)


{and on another note...}
when I go into my bedroom, I kinda made it way to big, is there any way to double my character size without redoing all the sprites??
#13
My question is basically in the topic but I saw in the "how to cure a cold game" that when you had the mouse over lets say paintings (text would show up on the bottom left side of the screen saying what object/hotspot you had the mouse over.

I was just wondering how you do this.  Thanks alot for reading and/or helping me out.
#14
I searched around the forum and only found one post that kinda helped me, but it was incorrect code so i didnt want to use it


Basically I have a simple map with a key on the ground that when clicked with the hand goes into inventory and is named "iKey" which i learned through the tutorial and did in the interaction thing, but I want to make it so that if you click on the door with the hand it says this door is locked.  But (you guessed it) when you use the inventory key it says the door is unlocked, and also removes the key from your inventory/allows you to now click the door with the hand cursor and go inside(load a new map).

with this best be done with the room script??? or can this be done easily with a few lines in the "room script"


sorry i am new and don't really know how this all works so far... wish there were more tutorials >.< the first one helped sooo much
SMF spam blocked by CleanTalk