Search found 675 matches

by jPV
Mon Dec 23, 2024 12:34 pm
Forum: Newbie questions
Topic: Single Keypress
Replies: 2
Views: 823

Re: Single Keypress

I would use the OnKeyUp event. Then you only get notifications when user releases the key and you can avoid the repeating key issue.
by jPV
Thu Dec 05, 2024 9:12 pm
Forum: Newbie questions
Topic: Drawing Custom Brushes
Replies: 5
Views: 1273

Re: Drawing Custom Brushes

Sorry a bit hurry for couple of days, but a quick reply.. If comment out SetFormStyle(#BORDER|#ANTIALIAS, {BorderColor = d_col, BorderSize = 1}) in the first (non-brush) polygon it won't draw anything at all (at least visibly). You're drawing black on black? Define a color for polygon. Produce diffe...
by jPV
Thu Dec 05, 2024 7:27 am
Forum: Newbie questions
Topic: Drawing Custom Brushes
Replies: 5
Views: 1273

Re: Drawing Custom Brushes

Produce different results? In the first example a double outline is drawn, but in the second example a single outline is drawn. Could you provide fully working examples? Hard to tell what's been done in your actual script before these snippets. And I can't seem to get BorderSize to do anything at a...
by jPV
Wed Dec 04, 2024 6:52 am
Forum: Newbie questions
Topic: Naming Layers
Replies: 9
Views: 2732

Re: Naming Layers

Yeah, emeck's and Flinx's ways are proper and suggested, but Bugala's is too complex when there are dedicated methods too.
by jPV
Mon Dec 02, 2024 1:24 pm
Forum: Hollywood bugs
Topic: CreateDisplay mode="moderequester" hardcoded height
Replies: 8
Views: 2787

Re: CreateDisplay mode="moderequester" hardcoded height

Try this: CreateDisplay(3, {Mode = "ModeRequester", Active=True}) OpenDisplay(3) ChangeDisplaySize(GetAttribute(#DISPLAY, 3, #ATTRHOSTWIDTH), GetAttribute(#DISPLAY, 3, #ATTRHOSTHEIGHT)) "ModeRequester" doesn't ask for a mode at the CreateDisplay() line, but only at OpenDisplay(),...
by jPV
Mon Dec 02, 2024 12:41 pm
Forum: General programming
Topic: My CreateDisplay failing in AOS3.
Replies: 3
Views: 1075

Re: My CreateDisplay failing in AOS3.

Isn't SystemScale more for scaling up on high-dpi monitors? And is there any way to detect dpi settings on AmigaOS anyway so could that mode even work on Amigas in theory? You should also have a pretty hefty Amiga to run any scaled content... maybe some emulated setups could do it, but I don't think...
by jPV
Fri Nov 29, 2024 12:40 pm
Forum: General programming
Topic: Why does this randomizer sort function fail sometimes?
Replies: 8
Views: 2306

Re: Why does this randomizer sort function fail sometimes?

I would change three things in it: 1) Use Local iterator variables, otherwise ix and i become global and may cause troubles or slowdowns 2) Temp variable isn't needed as you can swap variable contents with one line too 3) Hollywood styleguide instructs to name own functions with the "p_" p...
by jPV
Thu Nov 28, 2024 10:59 pm
Forum: General programming
Topic: Why does this randomizer sort function fail sometimes?
Replies: 8
Views: 2306

Re: Why does this randomizer sort function fail sometimes?

Yeah, and your function returns 0 or 1, so it could be optimized to

Code: Select all

Sort(Table, Function() Return(Rnd(2)) EndFunction)
But as said, it still doesn't work :)
by jPV
Tue Nov 26, 2024 12:07 pm
Forum: General programming
Topic: Local vs Global
Replies: 11
Views: 2830

Re: Local vs Global

I see the name$ being made available to p_CharName(), but this is the type of data that should be available across the code in multiple functions. How would that be done while avoiding using a Global variable? I guess a global variable would be ok for player data, unless you have some kind of main ...