Jump to content

Photo

ShopItem has bug I can't fix


  • Please log in to reply
9 replies to this topic

#1 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 11 January 2017 - 06:18 PM

can someone tell me what is wrong with this shop item script?

it's a modified version of Joe 123's script

the 2 problems are that link can pick up multiple items and and he uses his weapons when he sets down an item

 

here is the script

Spoiler

Edited by Shadowblitz16, 11 January 2017 - 06:21 PM.


#2 SUCCESSOR

SUCCESSOR

    Apprentice

  • Banned
  • Real Name:TJ

Posted 11 January 2017 - 06:57 PM

Alternative solution: use a better edit of Joe's shop script? http://www.purezc.ne...showtopic=52345


Edited by SUCCESSOR, 11 January 2017 - 08:09 PM.


#3 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 11 January 2017 - 07:49 PM

it looks like this script just buys the item when you pick it up.

I want link to have to take it to the shop keeper with it allowing 1 tile counter space in between them



#4 SUCCESSOR

SUCCESSOR

    Apprentice

  • Banned
  • Real Name:TJ

Posted 11 January 2017 - 08:07 PM

Sorry, I guess I should have looked at the script you posted better. I thought it was a version of the Joe123 script I had seen before. I will try to take a look at the script you posted a little later. I've got to get some food in me before using my brain again.

 

Does the original file have indentation? If so could you use the code box to repost it so I don' have to try to fix indentation? Also need the functions it calls. Does this have an original post?


Edited by SUCCESSOR, 11 January 2017 - 08:21 PM.


#5 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 11 January 2017 - 08:52 PM

I did use the code box but I can see if pasting it without the spoiler tag helps

edit: nope the code box is broken

 

here https://drive.google...QS1PXzlxbjJKMVU

it contains all my scripts that I am currently compiling


Edited by Shadowblitz16, 11 January 2017 - 08:58 PM.


#6 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 12 January 2017 - 01:18 AM

I did use the code box but I can see if pasting it without the spoiler tag helps

edit: nope the code box is broken

 

here https://drive.google...QS1PXzlxbjJKMVU

it contains all my scripts that I am currently compiling

Oh? Is Pure eating tabbing for other users, too?

 

Was there some problem with the script that I sent to you? I don't particularly mind padding more features into that, as I have yet to properly release it, and I was in fact, looking for more options that people might want out of it.



#7 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 12 January 2017 - 01:23 PM

ZoriaRPG the script if from Zepinho's set

I overwrote my script because I thought the one from his set was more finished I guess I was wrong



#8 SUCCESSOR

SUCCESSOR

    Apprentice

  • Banned
  • Real Name:TJ

Posted 16 January 2017 - 09:00 PM

Forgot about this. Looks like the problem with Link using weapons after he sets the item down might be as simple as changing the SetInput function to include the Link->Press* variables. You have to disable both I think I remember. Find the definition for it and try replacing it with this:

// simulate input press
void SetInput(int input, bool state){
    if(input == 0) { 
		Link->InputA = state;
		Link->PressA = state;
	}
    else if(input == 1) {
		Link->InputB = state;
		Link->PressB = state;
	}
    else if(input == 2) {
		Link->InputL = state;
		Link->PressL = state;
	}
    else if(input == 3) {
		Link->InputR = state;
		Link->PressR = state;
	}
}

see if that helps.

 

 

As for the other issue. I'll have to take a deeper look as my quick look through didn't spot anything obvious, though it may have to do with multiple ffcs with the same script not coded to play nice with each other. I may have to set up the script in a quest file and play around with it to fix it without breaking it. I'm not sure when I'll get around to that since this thing seems to call all sorts of functions that are in different files. Unless you've got a quest file you can send me with it set up.

 

EDIT: Code tags seem to work fine. You might have to set it to javascript for it to maintain tabbing. :shrug:


Edited by SUCCESSOR, 16 January 2017 - 09:01 PM.


#9 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 16 January 2017 - 09:18 PM

Forgot about this. Looks like the problem with Link using weapons after he sets the item down might be as simple as changing the SetInput function to include the Link->Press* variables. You have to disable both I think I remember. Find the definition for it and try replacing it with this:

// simulate input press
void SetInput(int input, bool state){
    if(input == 0) { 
		Link->InputA = state;
		Link->PressA = state;
	}
    else if(input == 1) {
		Link->InputB = state;
		Link->PressB = state;
	}
    else if(input == 2) {
		Link->InputL = state;
		Link->PressL = state;
	}
    else if(input == 3) {
		Link->InputR = state;
		Link->PressR = state;
	}
}

see if that helps.

 

 

As for the other issue. I'll have to take a deeper look as my quick look through didn't spot anything obvious, though it may have to do with multiple ffcs with the same script not coded to play nice with each other. I may have to set up the script in a quest file and play around with it to fix it without breaking it. I'm not sure when I'll get around to that since this thing seems to call all sorts of functions that are in different files. Unless you've got a quest file you can send me with it set up.

 

EDIT: Code tags seem to work fine. You might have to set it to javascript for it to maintain tabbing. :shrug:

 

One thing that can happen Successor, that I have debugged in ffc scripts that set InputA, InputB, and InputStart, is that if you set Input for those buttons false prior to Waitframe(), on the very next frame, if the user is still pressing them, ZC believes it is a new Press. This can lead to ffcs and item scripts autorepeating, and can in fact be a way to cheat the system.

 

I don't recall if doing this from a global active script has the same result; as it could be a general system timing issue.


Edited by ZoriaRPG, 16 January 2017 - 09:19 PM.


#10 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 17 January 2017 - 05:08 PM

@SUCCESSOR hmm I have java script enabled on google chrome so idk what is causing it. it works fine on other forums

also I will try it out currently I got interested in making my own editor in gamemaker

 

@ZoriaRPG oh so this might be what is I'll check it out later




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users