I do not want to avoid duplicates. It is a desired effect
- Game Maker Community
- → Viewing Profile: Posts: Mark Ian
Mark Ian
Member Since 17 Oct 2008Offline Last Active May 17 2013 05:18 PM
About Me
A degree was given by a wicked ruler to put to death all old people. A poor farmer took his aged mother up a mountain to obey the degree, but could not. He brought his mother down the mountain and hid her. The wicked ruler demanded that a twisted straw rope be made. It was the aged mother who told how to make the rope. The son told the governor the story and the degree was abolished.
Community Stats
- Group GMC Member
- Active Posts 133
- Profile Views 2008
- Member Title GMC Member
- Age 21 years old
- Birthday July 3, 1991
-
Gender
Male
-
Location
germanz Cologne
-
Interests
none
-
Version
Unknown
6
Lookin' good!
Latest Visitors
Posts I've Made
In Topic: How Would You Programm This More Elegantly?
14 May 2013 - 07:36 PM
In Topic: How Would You Programm This More Elegantly?
13 May 2013 - 07:55 PM
I have a second problem I am not sure how to tackle: I have an array with n values, some of the values are the same. The indexes of the values that match should be returned and the amount of same-value duplicates. I have a few ideas on how to do this, but again I'm not sure if it is the fastest way to compute. (I'll post my variant in a bit).
dump=0;
for (ii=0; ii<d_in_max;++ii) {
if marker[ii]=0 {
for (iii=ii;iii<(d_in_max-ii);++iii) {
if marker[iii]=0 and d_in[idd,ii]=d_in[idd,iii]{
dump+=1;
}
}
for (iii=ii;iii<(d_in_max-ii);++iii) {
if marker[iii]=0 and d_in[idd,ii]=d_in[idd,iii]{
marker[iii]=1;
if dump<4 {
d_in[idd,iii]+=dump
}else{
if (d_in[idd,iii]-(dump/2))>0 {
d_in[idd,iii]-=(dump/2)
}
}
}
}
}
}
here is my current algorithm for the problem... there must be a better way. Ive looked at this website http://aperiodic.net/phil/archives/Geekery/find-duplicate-elements.html but I cant get her or his ideas to work with my program.
In Topic: Unprecisely Gun
19 November 2012 - 04:58 PM
nah, include a bottle of vodka with your game and this code:
if vshoot=1 {
show_message('before pressing OK have a shot of vodka')
}
In Topic: Ini files in Studio
19 November 2012 - 04:21 PM
I agree. I am having the same problem. The .ini file the game has access to is located under (win7) 'x:Users\USERNAME\AppData\local\PROJECTNAME' The ini_read_real/string will read whatever is saved externally into the .ini file. When using the ini_write_real/string command, the game will write to something, because if one does another ini_read_real in the same section&amp;key one will get a modified value. My guess is that gms now loads ini files into memory and the ini_write_x function only writes to memory and never to the ini file. Meaning the next time the game is started the ini file will be reset... not good! (Which totally defeats the purpose of ini files -.-)<br /><br />The ANSI/UTF8 format of the ini file has no effect on this phenomenon.
I've figured out what is going on: gms writes to ini files during the ini_close command :/ flip stuff around. This should be included in the help file
I've figured out what is going on: gms writes to ini files during the ini_close command :/ flip stuff around. This should be included in the help file
In Topic: Strings and .INI files
08 October 2012 - 09:08 PM
you show no example of ini_read_real(), sort of a basic function of INI files.
- Game Maker Community
- → Viewing Profile: Posts: Mark Ian
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content